About Store Forum Documentation Contact



Post Reply 
Actor.kinematic
Author Message
Mardok Offline
Member

Post: #1
Actor.kinematic
Hi All, I have stange issue.
I'm trying to set "kinematic" value for my actor on TRUE in Player::create() but it doesn't work...
Trigger , mass, gravity working ok only kinematic not react

If i call actor.kinematic(1) by Kb.bp then working fine but in Player::create() no reaction

Could you explain why?
Code:
void Player::create(Game::ObjParams &obj)
{
    super::create(obj);
    mesh = obj.mesh();

    this->actor.mass(99);       //ok
    this->actor.kinematic(1);   //no reaction
    this->actor.trigger(1);     //ok
    this->actor.gravity(0);     //ok

    Actor &a=actor;
    a.kinematic(1);        //no reaction
}
(This post was last modified: 12-16-2011 01:40 AM by Mardok.)
12-15-2011 11:35 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
RE: Actor.kinematic
what do you mean no reaction?
if you're using player based on Game::Chr then it has only ctrl.actor
and ctrl.actor.kinematic is modified by some internal methods of Game::Chr
12-18-2011 05:43 PM
Find all posts by this user Quote this message in a reply
Mardok Offline
Member

Post: #3
RE: Actor.kinematic
My Player class is based on Game::Item and if i'm trying set actor.kinematic(1) in Player::create() then kinematic is still 0.

It's weird because if i call Players[0].actor.kinematic(1); inside Esenthel Bool Init() function then kinematic value is setting correct.

It's not a problem but i'm wondering why kinematic(1) in create() not working
Esenthel Wrote:actor.kinematic is modified by some internal methods of Game::Chr
Maybe with Game::Item is similary.
12-18-2011 06:27 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #4
RE: Actor.kinematic
please remember kinematic is modified in some methods in Game::Item class (check the source)
also: you can't set kinematic for static actors (of density=0)
12-19-2011 02:51 PM
Find all posts by this user Quote this message in a reply
Post Reply