About Store Forum Documentation Contact



Post Reply 
question about actor matrix
Author Message
nero81af Offline
Member

Post: #1
question about actor matrix
I tried to build an actor with controller class, but after simulation matrix values never change.

so I couldn't read physical results anywhere to build a mesh around it.

the values of controller.matrix are:

x = 2343423420000000000000000000000,0,0 (similar to this.. very high number anyway)
y = 0,0,0
z = 0,0,0
pos = 0,0,0

is there a special way to get controller actor's matrix values?
02-15-2010 01:16 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: question about actor matrix
controller works ok,
check the tutorial "physics\controllers"
you can draw the controller matrix values on the screen
(maybe you read values in debug mode with optimizations on)
02-15-2010 03:19 PM
Find all posts by this user Quote this message in a reply
nero81af Offline
Member

Post: #3
RE: question about actor matrix
ok I got it to work not using actor matrix directly but using matrix.pos for positioning and using cskel matrix.orn for rotation because I still can't rotate actor using ctrl.actor.matrix().orn.rotateY(Tm.d());
(This post was last modified: 02-16-2010 10:55 AM by nero81af.)
02-16-2010 10:54 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: question about actor matrix
ctrl.actor.matrix(matrix)

but I dont recommend it for real-time (each frame modification)
you can apply velocities, angular velocities, or just have the actor matrix constant, and just rotate the mesh (have a secondary matrix for the mesh, based on actor)
02-16-2010 03:35 PM
Find all posts by this user Quote this message in a reply
nero81af Offline
Member

Post: #5
RE: question about actor matrix
(02-16-2010 03:35 PM)Esenthel Wrote:  ctrl.actor.matrix(matrix)

but I dont recommend it for real-time (each frame modification)
you can apply velocities, angular velocities, or just have the actor matrix constant, and just rotate the mesh (have a secondary matrix for the mesh, based on actor)

ok I'm setting rotation input directly on cskel matrix.orn parameter, then for moving back and forth controller I use his update method passing cskel matrix.z vector then I update cskel matrix.pos based on ctrl.actor.matrix().pos

I guess it's ok for real time?
02-16-2010 07:14 PM
Find all posts by this user Quote this message in a reply
Post Reply