Limited rotation in BGE

Hello, i have a question. How can i limt (min, max) rotation of my cannon ? i have binded with key Q and E but there is no limit of rotation, the model passes on my flor :S . Pls help /www.dodaj.rs/f/1k/ga/wyrdMQ6/untitled.png <- here is the image

Rigid body joints?

Don’t parent, set the object as a rigid body and then apply torque

or alternatly try a dynamic or torque using AngV

So
Set object Dynamic or Rigid body
Add constraint Rigid body joint
Set to 6dof and set limits,
:slight_smile:
pin it to a empty
make sure origin is the origin of item you want to rotate,

@BPR: involving physics doesnt always solve things

you can try constraints, they are logic bricks that can limit rotation or location off an object in a especific axis, also, i couldnt see your image, it threw me a 404 error
edit: i found it here

Here is both

Logic + Property

and another that is

physics+ constraints :slight_smile:

Attachments

Xample2.blend (439 KB)

@BPR: involving physics doesnt always solve things

Tell that to physics…

:slight_smile:

@BluePrintRandom thank you so much!! that’s i what i needed :slight_smile:

No problem :slight_smile: