Community
Message Board

Chat room - users
Game Over
( 394431 downloads)
Work In Progress
( 523201 downloads)
Links

Code Exchange
Downloads
Tutorials
Add to Favourites

Submit news

DIV ARENA FORUMS
Not logged in [Login - Register]
Go To Bottom

Printable Version  
Author: Subject: get_angle in Mode 8
steffen87
DIV Junior
**




Posts: 32
Registered: 4-4-2022
Location: Germany
Member Is Offline


[*] posted on 15-4-2022 at 08:03 AM
get_angle in Mode 8


Hello everyone!

I want the m8-camera facing a process, but it didn't work. Is this not possible in mode 8 or am I doing something wrong?

angle = get_angle(...)

Should also be working for the m8 cam, right?

This is what I want to do:
in my game is a tower and I want a short sequenz where the camera is going higher, thenfacing the middle of the tower and fly 360° around it, then flying back to the original position.
View user's profile View All Posts By User
CicTec
DIV Pro
******




Posts: 471
Registered: 6-8-2016
Member Is Offline


[*] posted on 15-4-2022 at 08:55 AM


Hello,

Yes it is possible but with the use of more commands,

Open the DIV help with F1, look for the start_mode8 function and load the example it shows as code, run it and observe the environment, then study the commands it uses:
Code:
if(key(_right)) angle -= 5000; end if(key(_left)) angle += 5000; end if(key(_up)) advance(24); end if(key(_down)) advance(-9); end if(key(_q)) z += 16; end if(key(_a)) z -= 16; end if(key(_w)) m8.angle += 8; end if(key(_s)) m8.angle -= 8; end

left / right = control the angle of the camera in the vertical axis (for the observer it is equivalent to turning on himself 360 ° inside a room for example)
up / down = control the distance of the camera from the focal point (for the observer it is equivalent to approaching or moving away from a wall of a room we are observing for example)
q / a = controls the height of the camera (for the observer this is the same as looking at the room from the floor, climbing a ladder or bending over his knees for example)
w / s = controls the angle or point of view of the camera (for the observer it is equivalent to looking at the environment of a room by lowering or raising his eyes, neck or both)

By combining these variables / functions appropriately you can simulate the effect you are looking for, a great start is to imagine one of the pillars of the external structure of the example as the tower, then use the commands to walk around it, go up / down, etc .. .
View user's profile View All Posts By User
steffen87
DIV Junior
**




Posts: 32
Registered: 4-4-2022
Location: Germany
Member Is Offline


[*] posted on 15-4-2022 at 09:32 AM


I wanted to use xadvance (like in the wld_view example when pressing Alt+left/right) while at the same time the cam is looking at on point, so that you can see the tower in my game from all sides.
View user's profile View All Posts By User
steffen87
DIV Junior
**




Posts: 32
Registered: 4-4-2022
Location: Germany
Member Is Offline


[*] posted on 15-4-2022 at 12:00 PM


It works! The camera now flies a perfect circle around the (not yet finished) tower. :)

The get_id was above LOOP, now below LOOP and it works.
View user's profile View All Posts By User
CicTec
DIV Pro
******




Posts: 471
Registered: 6-8-2016
Member Is Offline


[*] posted on 15-4-2022 at 12:56 PM


Great. :)
View user's profile View All Posts By User

  Go To Top

Powered by XMB
XMB Forum Software © 2001-2012 The XMB Group
[Queries: 18]