I decided to stop filling night_hawk`s PhysX topic with my endless questions, that`s why I created this one.
Here`s what I did so far. It`s almost nothing, although it took me about 5-6 hours...
== Link deleted ==
This is the code I used. I know that using "setGlobalPosition()" is a childish
solution, so may I ask you which PhysX function should I use to get non-physical alike type of movement?
Code: Select all
angle+=((keys[KEY_KEY_D])-(keys[KEY_KEY_A]))*3;
float mforce=((keys[KEY_KEY_W])-(keys[KEY_KEY_S]))*5;
core::vector3df theposvec;
NxVec3 curposition=Nodes[0]->GetActor()->getGlobalPosition();
NxVec3 aimposition ( (cos(((angle)*PI)/180))*mforce, 0, (-sin(((angle)*PI)/180))*mforce );
Nodes[0]->GetActor()->setGlobalPosition(NxVec3 (curposition+aimposition));
In the beggining 5 boxes, 5 spheres and 5 capsules are created. There isn`t an Irr node capsule mesh ( and it would be insane to have such ), that`s why I used box mesh for them. I wanna ask how can I create a character dummy( capsule or ellipsoid) standing tall. Should I use joints for that?
Ahh, and currently the physics box, represnting the character isn`t rotating. How can I rotate it to "match" the visible "character"?
PS: I`m getting about 80 fps on AMD 1,14Ghz, 512Ram, 128 Ati radeon