Ok, if this is the wrong topic I apologise but since the attack involves programming and there is no category named ‘Constraints support’ putting it here.
Ok, so i’m trying to make a boss attack where the golem throws a bolder at the nearest player, and ive chosen to go with align position since its a newer constraint and Body Position is a mess when combing it with welds to keep it in line with animation.
Basically I want the bolder to move at the speed of the first gif, while the accuracy of the second.
First is not using ridgity enabled, the second is.
I change the attachment via script from the golem’s hand to the player’s HatAttachment, other then that rn no other modifications are taking place via script.
I think you’d get a much more satisfying effect if you just calculated how much velocity you need to give the boulder to reach the target (like an actual throw). It also will allow much more dynamic gameplay, like taking cover from the boulders, rather than being chased by heat seeking rocks.
^^Obviously you can get around that pretty easily but physically simulated just makes a lot more sense in this case
mhm, I tried doing something similar with body positions and I also if this worked would most likely delete the constraint halfway through its journey and let the rest be simulated by physics (not a perfect solution of course). How would you attempt your system?
You can simply just calculate a Velocity based on the direction vector between the hand and target and a scalar speed. Then just use part.Velocity = speed*direction to set an instantaneous velocity for your projectile. If you want a magical rock that keeps going in some direction, then you can use a BodyVelocity and the same Velocity calculation.
My problem is tho, currently im welding to the golem’s hand, however when I break the weld the velocity ‘glitches’ and the part starts jittering. Hence why I was using align position. Do you have any solutions to stop this from happening ?