Welcome Guest [Log In] [Register]
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:

Username:   Password:
Add Reply
Third person
Topic Started: Aug 31 2012, 06:09 PM (126 Views)
svenotje1
Advanced Member
[ *  *  * ]
Hello i want to make a third person game, but i don't get the player verywell on the screen it alsways has an angle of 90 degrees en i want to have 45 degrees as view angle. But every time i change the view the camera go closer/to far from the object.

This is my code:

Create camera
Code:
 

view = 45
z=16
follow = obj_player;
distance = 10;
perspective = 1;


MoveCamera();


In the step stands only MoveCamera();

Now for the object obj_player

create
Code:
 

file='models/player.3ds'
LoadMesh();
speed2=0.1
scalx=10;
scaly=scalx
scalz=scalx
height=0
for ( i = 0; i < 50; i += 1 )
{
SetModelMaterial( i,255,255,255,255);
}
z=16


In the destroy even stand Destroy();

In the step:

Code:
 

PlayerStep();
Step();


Player step is just move.
Offline Profile Quote Post Goto Top
 
RonBurgundy
Member Avatar
Forum Borat
[ *  *  *  *  *  * ]
You want the camera to rotate 45 degrees to the player, correct?

View is FOV and has nothing to do with rotating.

in player step:
roty = camera.rotatey - 45

you can change 45 to any number between 180 and -180.
!!! DEFEND POP PUNK !!!
Offline Profile Quote Post Goto Top
 
svenotje1
Advanced Member
[ *  *  * ]
no i mean that the view angle not from side is but 45 degrees
Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply