I use vehicle.js to control my car,but ,I am not pleased with the effect of the Collision;so I want to do some function in the collider event ;
normally,i use event of CollisionComponent,like this:
Now,there is no CollisionComponent to use for me !
so,how can i use collision event???
thank you !
I’m from china…
Adjust .js is not useful ,so ,you don’t have a care on it;
I want to use collide event in my scripts, example :in my MyVehicle.js, to use a event ,OncolliderStart ;
The shape of Collision is not usefor,because I use Ammo.js to create shape instread of collisioncomponent
I hope that the car get a stronger collisiion from the barrier ,I hope that after the car hit from the barrier,it can be flick far away.
so I want to give the car a stronger impluse force
I want to get the point of the hit on the wall from the collider event;
As you can see,in my MyVehicle.js , I use Ammo.js to create the shape, not use the type of collisioncomponent
Ammo.js is the C++ Bullet physics library compiled into JS so the documentation for it is hard to find. It involves going through the documentation of Bullet and finding out what is exposed in Ammo.js.
[quote=“z281159443, post:17, topic:9359, full:true”]
I just want to learn the API in Ammo.js,for example: this.vehicle.getRigidBody().setAngularFactor(ammoVec);