| We hope you enjoy your visit. You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you are already a member please log in to your account to access all of our features: |
| equivalent variables in U3D | |
|---|---|
| Tweet Topic Started: Oct 11 2008, 04:38 PM (420 Views) | |
| MakeGamer6.1 | Oct 11 2008, 04:38 PM Post #1 |
|
Newbie
![]() ![]() ![]()
|
I need to know equivalent variables for xfrom yfrom zfrom xto yto zto angle from the function d3d_set_projection_ext(xfrom,yfrom,zfrom,xto,yto,zto,xup,yup,zup,angle,aspect,znear,zfar) in U3D.I've already tried using xfrom=camera.x yfrom=camera.y zfrom=camera.z xto=player.x yto=player.y zto=player.z+player.height angle=camera.viewORcamera.rotatex(The camera is following the player with prespective set to two), but the script, which requare this variables, didn't work properly. |
![]() |
|
| Eansis | Oct 11 2008, 04:39 PM Post #2 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
You must set the camera's roty to point_direction()-90 |
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY
| |
![]() |
|
| MakeGamer6.1 | Oct 11 2008, 04:45 PM Post #3 |
|
Newbie
![]() ![]() ![]()
|
Do you mean roty=point_direction(x,y,player.x,player.y)-90 and angle=camera.roty? |
![]() |
|
| MysteriXYZ | Oct 11 2008, 05:34 PM Post #4 |
|
Master Matrix Masher
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
When the camera is following an object, you cannot use rotx or roty to rotate it; use rotatex and rotatey instead. What you need for angle is the horizontal viewing angle, but camera.view is twice the vertical viewing angle. The value you need is given by:
|
| U3D is like candy; after extensive consumption, it's Best to brush. | |
![]() |
|
| MakeGamer6.1 | Oct 11 2008, 05:47 PM Post #5 |
|
Newbie
![]() ![]() ![]()
|
So v_width and v_height are view_width and view_height so I should use view_wview[0] and view_hview[0]? |
![]() |
|
| MysteriXYZ | Oct 11 2008, 05:53 PM Post #6 |
|
Master Matrix Masher
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
camera.v_width and camera.v_height are by default set to view_wview[0] and view_hview[0] respectively, yes, but if you want to use split screen for example, you would set them to smaller values. So just use camera.v_width and camera.v_height. |
| U3D is like candy; after extensive consumption, it's Best to brush. | |
![]() |
|
| MakeGamer6.1 | Oct 11 2008, 06:03 PM Post #7 |
|
Newbie
![]() ![]() ![]()
|
This doesnt work either. |
![]() |
|
| MysteriXYZ | Oct 11 2008, 06:14 PM Post #8 |
|
Master Matrix Masher
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Maybe you should give more info about what exactly you're trying to do. Saying that "it doesn't work" isn't very clear. |
| U3D is like candy; after extensive consumption, it's Best to brush. | |
![]() |
|
| MakeGamer6.1 | Oct 11 2008, 06:24 PM Post #9 |
|
Newbie
![]() ![]() ![]()
|
Excuse me for the incoviniance.Tepi from the gmc made code which defines a point on a xy plane in 3d by clicking on it with the mouse in ortho.To say it more simple, if you are playing a 3d strategy game and click on the terrain to move the unit, this is the right script.Here it is:
Default FOV is 41(that angle argument).But since I'm using U3D, I need a way to calculate it and there isn't any success so far.oigr is the player object. |
![]() |
|
| skarik | Oct 11 2008, 06:59 PM Post #10 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
You don't actually need that. You just can use the collision functions (the ray tracing) and one of MystXYZ's examples that does EXACTLY what Tepi's example does. I've seen it on the GMC here and there, so I get what you're saying. The Topic: http://forum.ultimate3d.org/topic/173872/1/ |
| Blog|EHS | |
![]() |
|
| MysteriXYZ | Oct 11 2008, 07:13 PM Post #11 |
|
Master Matrix Masher
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
And here's a script that you could use instead of the one you have:
|
| U3D is like candy; after extensive consumption, it's Best to brush. | |
![]() |
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |





![]](http://z1.ifrm.com/static/1/pip_r.png)



2:48 AM Jul 11