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.

Author
Message
sadsack
22
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 17th Feb 2011 18:02
Hi All,
I am making a shooting range. I don't like using (Lock object on)
to keep the weapon locked to the screen. I hope some one can tell me a better way of doing it.
Thank You
renny

Life is not fair, so deal with it.
http://www.gusroundtable.com/
=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 17th Feb 2011 18:55 Edited at: 17th Feb 2011 18:57
I just position it in front of the camera, rotate it every loop (and disable z-depth at the beginning)

This way the lighting still affects it

sadsack
22
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 17th Feb 2011 22:59
I can't get the camera and object to rotate togather.
here is the code



I am not sure how to make them rotate on the same plain.
Thank you
renny

Life is not fair, so deal with it.
http://www.gusroundtable.com/
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 17th Feb 2011 23:33
Try this logic:

1. Position and Rotate Camera
2. Position and Rotate Weapon to match camera
3. MOVE OBJECT to shift the weapon forwards in front of camera.

This is very simple logic, but it removes anything complex and confusing.

You also have 2 SYNCS where you only need 1.

sadsack
22
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 18th Feb 2011 02:43
WelL I have been working on this for the a day now,and still I can not make it work.
Here is my code,



I sure some one out there know how to put a waepon on the screen so it does not move. But maybe not.
Thanks
renny

Life is not fair, so deal with it.
http://www.gusroundtable.com/
Mr Bigger
21
Years of Service
User Offline
Joined: 31st Jan 2005
Location: was here!
Posted: 18th Feb 2011 03:20 Edited at: 18th Feb 2011 03:32


AMD 2600+/1GB ram/GeForce 6600oc 256MB/W2KPro/DBPro 6.6.b
sadsack
22
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 18th Feb 2011 16:21
Thanks, that is the comm I been looking for
set object to camera orientation 1
it works good
Thank you
renny

Life is not fair, so deal with it.
http://www.gusroundtable.com/
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 18th Feb 2011 17:43
It's the same as rotate object Obj, Camera Angle X(), Camera Angle Y(), Camera Angle Z()
?

My signature is NOT a moderator plaything! Stop changing it!
sadsack
22
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 19th Feb 2011 01:09
I will try that and see if that works too
Thanks Mobiius
renny

Life is not fair, so deal with it.
http://www.gusroundtable.com/
sadsack
22
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 19th Feb 2011 18:58
It works fair, must play with the size of the object and placement.
Thanks all for you help
renny

Life is not fair, so deal with it.
http://www.gusroundtable.com/

Login to post a reply

Server time is: 2026-07-17 19:13:45
Your offset time is: 2026-07-17 19:13:45