There’s quite some question related to ActionManager
already, I am sorry to bring out yet another one.
My problem is described as titled.
I’ve followed through a set of tutorials and implemented event listeners in BABYLON.ICameraInput<T>
, then in another tutorial I saw Scene.ActionManager.
My main concern is when to use which, or more specifically, use case of BABYLON.ICameraInput<T>
. Maybe the ability to detach
and attach
? Or is it just a design choice?
I feel like they are interchangeable, both use addEventListener
somewhere, ActionManager handles input in the main render loop, ICameraInput.checksInput
probably also run once every loop.
and the other thing, collision/gravity etc.
You can set Scene.gravity
, Mesh.checkCollisions
, Mesh.moveWithCollisions
, etc
on the other hand, physics engine provided these with Scene.enablePhysics(gravity)
, Mesh.physicsImpostor
, Mesh.applyImpulse
, etc
My question is do they interfere, for example, does Mesh.checkCollisions
check the collisions with the Mesh.physicsImpostor
. Without extensive testing I feel like they aren’t related, if they are really not related then my other question is, again, when to use which, or is it fine for me to drop Mesh.checkCollisions & moveWithCollisions
completely and use physics engines-related method instead?
Sorry for the long question, thank you.