How would i do a melee attack where when mouse left is clicked, the sword would make contact with enemy and deal damage to them? i can’t do animations, so is there a way for me to make the sword move without them? and also how would i code the script for the entity colission of the sword to deal damage?
Yes, you can do animation with Tween plugin.
It’s easy to work with , you can set collision object for detection on model, it’s going to move along side your model
Check this out : https://github.com/playcanvas/playcanvas-tween
As well this one : PlayCanvas 3D HTML5 Game Engine
About collision detection, please check this tutorial project on how collision works
https://playcanvas.com/project/405871/overview/tutorial-collision--triggers
2 Likes