Jump to content
Sign in to follow this  
mihai architect

constrain problem

Recommended Posts

I'm not sure what you want to happen here...

should the capsule object follow exatly with the box? and the gun object point at the target?

Share this post


Link to post
Share on other sites

exactly ! The capsule object should not only follow the box object but it should stay on the top face of the box and rotate around Y ( perpendicular to that face) while still aiming at the target.

Share this post


Link to post
Share on other sites

I think the problem is that you're not computing the rotations in the right space. I've attempt to correct that in the attached file. The gun though, I've left to move freely as I think that mimics more closely the real world situation. Of course in the real world, there's limits to the gun's rotations. :)

constrain_problem2.hipnc

Share this post


Link to post
Share on other sites

I think it's very ok. It's what I was looking for. The gun and the turret should not spin over and over like in real world, but it's just about the principle, so I was not interested in that. The perfect aiming tough it's very realworld like. Nowadays there are systems that can aim a target while still moving freely on the terrain. That is what I was trying to achieve. I see you used Objects CHOPs whitch I didn't knew how to work with. But that solved the problem. Anyway it's a bit more complex than I expected. When I first started I thought it would be easier. Many thanks. If anyone could make it in some other way I would appreciate. Thank you !

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×