TXGorilla Falcone
KWKAT Planetfurry DJ
Join date: 4 May 2004
Posts: 176
|
01-17-2006 15:09
Howdy agine all and appoligies in advance
I am currently working with a mouse look turret on a vehicle and wander if its possable to limmit the movement of the barrle to only up and down and that by a certan angle also.
That way the vehicle has to be aiming twards its target to hit it.
I wish to limit the barrel to 0° <Horizen> to 45° and no piviting
_____________________
Drunken Monkeys danceing on the tables. Falling from the sky just like in a fable.
|
Deneria Sholokhov
Leaf on the Wind
Join date: 25 Oct 2005
Posts: 12
|
01-17-2006 15:32
Hmm, probably not restrict the mouselook, but you should be able to restrict the turret movement in the control block. just a simple if (turret_angle > limit) {turret_angle = limit;} should do the trick.
use local radians as your limiters and you should be ok. in the if block you could also communicate with a HUD device to inform the user they are looking out of aiming scope.
|
Ben Bacon
Registered User
Join date: 14 Jul 2005
Posts: 809
|
01-18-2006 05:02
From: Deneria Sholokhov you could also communicate with a HUD device to inform the user they are looking out of aiming scope. great idea! something like a hud-based target reticle that is red when the mouse-look angle exceeds the turret limit, black when there is no avatar in the direction the turret is pointing, blue if there is an av but they're out of range, and green with tone when you have "lock" 
|