I have a gltf file that has a robot and I have to animate the robot arm but I am unable to get the pivot point to rotate an arm.
I am trying to follow the below steps:
Move the object to the pivot point1.1. SUBTRACT the the pivot point from your object’s original position
Apply your rotation
Move the object BACK by the same position vector1.1. ADD the the pivot point to your object’s new position
hello ,
don’t know if objects come from blender , but at every object is associated an origin point . if you need arm does turn around a pivot point ,associate it in your software (blender ? ) the origin point of your arm at the pivot’s place . like this in your robot object and in init() method you can write
and after in your “run()” method of your robot object you can write
this.robot_arm.rotateY(this.robot_arm_rotation);
it will turn around your pivot point
edit: you can read that too ( Three.js Scene Graph ) , it could help you , it is about scenegraph and how to organize objects with group , to run complex movement /rotation with different object in your scene .