About Store Forum Documentation Contact



Post Reply 
Character rotation and gravity
Author Message
Ecki Offline
Member

Post: #1
Character rotation and gravity
Hello,

I've been trying to use the included character class for my needs but i can't really get it to do what i want so what i wanted to ask is:
1. Is there a way to rotate the character so I can make a character sit in the cockpit of a spacecraft (which can freely rotate in space) ?
2. Is it possible to change the direction of gravity so the character walks along a wall ?
11-06-2010 07:44 PM
Find all posts by this user Quote this message in a reply
Zervox Offline
Member

Post: #2
RE: Character rotation and gravity
Use the spacecraft rotation matrix? or the opposite, question is who you are rotating and copy the info over.
11-06-2010 11:47 PM
Find all posts by this user Quote this message in a reply
Ecki Offline
Member

Post: #3
RE: Character rotation and gravity
That doesn't work. It only uses the position information but not the rotation.
11-07-2010 01:18 AM
Find all posts by this user Quote this message in a reply
Zervox Offline
Member

Post: #4
RE: Character rotation and gravity
Why doesn't that work?
Thought that was what the object matrix().orn."params" was possible to use for it.

worked for me atleast.
(This post was last modified: 11-07-2010 02:44 AM by Zervox.)
11-07-2010 02:43 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
RE: Character rotation and gravity
for rotating character in any orientation, you need to override chr::animateupdatematrix and set custom matrix

you can change gravity with physics.gravity
11-07-2010 01:25 PM
Find all posts by this user Quote this message in a reply
Ecki Offline
Member

Post: #6
RE: Character rotation and gravity
Thanks, i totally overlooked that one.
Now it's rendering my pilot at the right position and angle but when i use cskel.getpoint("head") it still gives me the position where it was before getting into the pilot seat and when i stop using the custom matrix in animateupdatematrix the character is also back at that position.

Edit: Sorry i made a mistake. cskel.getpoint does in fact work properly. It's only the controller's position that doesn't get updated with the skeleton.
(This post was last modified: 11-07-2010 06:19 PM by Ecki.)
11-07-2010 03:11 PM
Find all posts by this user Quote this message in a reply
Post Reply