3 registered members (AndrewAMD, Ayumi, 1 invisible),
1,291
guests, and 3
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: incorrect camera-movement
[Re: V_Sola]
#250566
02/08/09 19:18
02/08/09 19:18
|
Joined: Oct 2008
Posts: 67
Crypton
Junior Member
|
Junior Member
Joined: Oct 2008
Posts: 67
|
Maybe this will clear out something: (play with the values and change player for my) vec_set(camera.x,player.x); camera.z += 63; camera.x -= 100*cos(player.pan); camera.y -= 100*sin(player.pan); camera.pan = player.pan;
Cheers!
New into Gamestudio and eager to learn it.. Stuff and games done in 2D: LINK
|
|
|
Re: incorrect camera-movement
[Re: Crypton]
#250576
02/08/09 19:57
02/08/09 19:57
|
Joined: Nov 2007
Posts: 13 Germany / Munich
V_Sola
OP
Newbie
|
OP
Newbie
Joined: Nov 2007
Posts: 13
Germany / Munich
|
now it looks like this:
action wizard_with_pointer() { wizard = my; my = player; player.ambient = 100; while(1) { //VECTOR speed; player.pan += -50 * mouse_force.x * time_step; player.x += -5 * (key_a - key_d) * time_step; player.y += -5 * (key_s - key_w) * time_step; c_move (my,nullvector,nullvector,IGNORE_PASSABLE | GLIDE); vec_set(camera.x,player.x); camera.x -= 100*cos(player.pan); camera.y -= 100*sin(player.pan) - 150; camera.z += player.z + 25; camera.pan = player.pan; camera.tilt = - 12;
wait(1); } }
but the camera still moves wrong and the engine doesn't find the pointed model. Wheres my mistake?
Last edited by V_Sola; 02/08/09 19:59.
|
|
|
Re: incorrect camera-movement
[Re: Quad]
#250580
02/08/09 20:21
02/08/09 20:21
|
Joined: Oct 2008
Posts: 67
Crypton
Junior Member
|
Junior Member
Joined: Oct 2008
Posts: 67
|
also it would have been easier (as I mentioned before) to just change player to my. player is built-in pointer. As you have already wizard pointer created, you don't have to attach this action to player pointer anymore. If you choose to use player then replace wizard with player. But I guess you use wizard pointer somewhere else, so this wouldn't be a good idea!
Cheers!
New into Gamestudio and eager to learn it.. Stuff and games done in 2D: LINK
|
|
|
Re: incorrect camera-movement
[Re: nsksleeper]
#251254
02/12/09 09:17
02/12/09 09:17
|
Joined: Aug 2008
Posts: 43 Germany, Baden-Württemberg
Mageron
Newbie
|
Newbie
Joined: Aug 2008
Posts: 43
Germany, Baden-Württemberg
|
I created an own view called Sicht and some new variables: VAR sicht_dist[3] = -20,0,20; //The dist form the view to the player VAR sicht_ang[3];
Add this in your Action: vec_diff(temp,nullvector,sicht_dist); vec_to_angle(sicht_ang,temp); vec_set(Sicht.x,sicht_dist); vec_rotate(Sicht.x,my.pan); vec_add(Sicht.x,my.x); vec_set(Sicht.pan,sicht_ang); ang_add(Sicht.pan,my.pan);
I hope I could help you.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|