Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / [Dark AI] How do I make a turret look at the camera?

Author
Message
Umbra
17
Years of Service
User Offline
Joined: 27th Jan 2007
Location:
Posted: 18th Jul 2008 04:01 Edited at: 18th Jul 2008 04:30
Q:How do I get the turret to look at the camera, ive tried using player entity and creating an object that stays on the camera position but I cant get the turret(gunsentry) to look at the player even if the wrong side of the gun is pointing toward me.

[Mini Question] Q: How would I make it so that the video on an image plane is viewable from an infinite distance instead of fading away?

Any [Code Snippets] Responses on this will be immensly helpful. Yes I have searched forums for this I could not fin anything. Thank you in advance to all the people who reply to this post.

[update] okay so i stopped trying to do what ive stated instead i am trying to simply make the ai get started by looking around.

here is my code. "probably screwed up in more ways than one.
(AI entity still does nothing)



JerBil
20
Years of Service
User Offline
Joined: 8th May 2004
Location: Somewhere along the Z axis...
Posted: 18th Jul 2008 05:22
For one thing you need to set the ai player position
in your main loop. You only set it before the loop.
Maybe use ai look at position in your loop to force it to
look at the player position as well.

Ad Astra Per Asper
Umbra
17
Years of Service
User Offline
Joined: 27th Jan 2007
Location:
Posted: 18th Jul 2008 18:42
oh, thanks. ^_^

Umbra
17
Years of Service
User Offline
Joined: 27th Jan 2007
Location:
Posted: 21st Jul 2008 20:50
okay so im moved it around but the results are strange everything moves when i hit the arrowkeys and the camera stays in place heres my code.



HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 21st Jul 2008 22:14
The above code if it had worked how you wanted, what where you hoping it would have done.

Dark Physics makes any hot drink go cold.
Umbra
17
Years of Service
User Offline
Joined: 27th Jan 2007
Location:
Posted: 22nd Jul 2008 20:27
okay well i have the turret looking at me now but dark ai doesnt support looking at the yaxis and i need to know how to do that, im not quite sure how that would work out so could i get some help with that? (after this ill be working on making the turret only look in my direction when i get in a certain area.

HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 22nd Jul 2008 20:56
Its just a thought, the turret is alway going to be where it is on that level and you know the height of the camera or AI, so it would be something with distance angle. like pick object returns where and object is to pick up.

Dark Physics makes any hot drink go cold.
Umbra
17
Years of Service
User Offline
Joined: 27th Jan 2007
Location:
Posted: 22nd Jul 2008 21:03
huh?

sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 24th Jul 2008 14:31
@Umbra

I just had a look at your last code post and your ai update and sync are in the rong place, they need to come befor the loop.

like this


soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!
Umbra
17
Years of Service
User Offline
Joined: 27th Jan 2007
Location:
Posted: 25th Jul 2008 06:08 Edited at: 25th Jul 2008 06:13
ok i have all the code for making the ai entity/object looking at me but no will need to figure out how to have it look at the object/player/camera position to follow me on the y axis.


*yes the turret is stationary*

ps the reason i had them in the wrong place is because i had some messed up code that when the phy update was is the loop made the program go nuts.

Login to post a reply

Server time is: 2024-11-24 20:53:51
Your offset time is: 2024-11-24 20:53:51