• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Camera Target

Status
Not open for further replies.
Level 11
Joined
Aug 16, 2007
Messages
847
It seems unlike but I am really hoping someone can offer me a way to do this.

Essentially what I want to do is to let you use your mouse to point your camera (Using Mouselook) at certain objects, and then press the right mouse button to examine the object.

Targeting.jpg


As you can see in the image above, there is a target in the middle of the screen that you can use to aim at the object. I would like it so that for example you could point the mouse at the door, and press the right mouse button and it would open (Assuming that you are close enough).


So far my thoughts have been to use some kind of projectile to be launched from the camera to see what it is pointing at. But I am not really sure how I would go about that.
 
Level 5
Joined
Jul 4, 2007
Messages
166
Why not make the door a selectable object and use the normal Warcraft engine to do your work for you? Have a trigger that executes when the door is selected, and checks to see if the clicking player's unit is within range.
 
Level 5
Joined
Jul 4, 2007
Messages
166
Can't,

first off, this is Starcraft :p

But seriously, the mouse disappears when using mouselook, so you can't select anything, and also the mouse isn't always in the center.

Typos, typos.

That said, I haven't played with mouselook at all yet, so I didn't realize. You could use a projectile like you said and use a 3D point that has a height orientation, I guess...

I dunno. It seems like it might be more efficient if mouselook has relative angles that you can query. I'm not really sure how to approach it, since I don't know the mouselook mechanics.
 
Status
Not open for further replies.
Top