Search the Community
Showing results for tags 'playeractor'.
-
The problem with applying addForce() to PlayerActor.
evgenij.zherenkov posted a topic in C++ Programming
Hello! I apply force to the PlayerActor so that it moves horizontally. Logically, it should be uniformly accelerated (using gravity as an example), but its speed will fluctuate from 1.2-2. It seems as if something is stopping him from accelerating. In the vertical plane, everything works correctly. I use addForce() in the flush() function. And if I’m doing exactly the same but applying force to the created figures in maps, then everything works correctly. This effect is only in PlayerActor. PlayerActorPtr actor = PlayerActor::cast(Game::get()->getPlayer()); if (actor) { BodyRigidPtr obj = BodyRigid::cast(actor->getBody()); if (obj) { obj->addForce(obj->getCenterOfMass(), Math::vec3(0, 9.81f*obj->getMass(), 0)); } } -
hi , i'm studying for Unigine. i have a problem. I saw sample ' actor01' and i knew playeractor is need to move physics playermoving. playeractor works when playeractor pivot is appeared in my camera. However, playeractor pivot is not in my camera , playeractor doesn't work. please help me how can i solve it.
- 3 replies
-
- playeractor
- physics
-
(and 1 more)
Tagged with:
-
Hi, I was trying to simulate bullet(has body) collision with a custom AI class that has a PlayerActor instance. How do I detect if the bullet has hit the PlayerActor capsule shape? Currently, from the bullet's contact callback function, I am receiving a contact with a body (of AI). I presume this body is PlayerActor class's body (playerActor.getBody()). Now that I have found this body, how do I find it's PlayerActor?
- 1 reply
-
- PlayerActor
- Collision
-
(and 1 more)
Tagged with:
-
To move objects using PlayerActor, when I add it to the editor in an errors. PlayerActor actor = new PlayerActor(); add_editor(actor);