Trigger not trigged when not walk
Posted: Sun Jan 12, 2020 1:36 pm
When character is not walking it does not trigged trigger. Is this normal? Or I done something wrong.
Former forum of queegs; use github discussions now!
https://forum.bepuentertainment.com/
Code: Select all
var handle = Simulation.Bodies.Add(BodyDescription.CreateKinematic(trigger.StartPosition, collidable, new BodyActivityDescription(-1)));
Code: Select all
/* (!characterBody.Awake &&
((character.TryJump && character.Supported) ||
newTargetVelocity != character.TargetVelocity ||
(newTargetVelocity != Vector2.Zero && character.ViewDirection != viewDirection)))
{*/
simulation.Awakener.AwakenBody(character.BodyHandle);
//}
character.TargetVelocity = newTargetVelocity;
character.ViewDirection = viewDirection;
Code: Select all
Simulation.Awakener.AwakenBody(bodyHandle);
Probably not!Will it make bepu slow?
This just sets the sleep threshold at -1, and since velocity magnitude can't go negative, the object can't go to sleep. It's a perfectly valid way of keeping an object permanently awake.new BodyActivityDescription(-1)
Notably, unconditionally calling this every frame is redundant with setting the character's sleep threshold to a negative value.simulation.Awakener.AwakenBody(character.BodyHandle);
Sleeping bodies of any type (and statics) will not generate collision tests with each other.Is kinemetic does not collide with stop body?