Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#1 29-Aug-2014 08:32:45

el_motoblock
Member
From: Russia
Registered: 16-Feb-2013
Posts: 270

savegame function

hello!
my project https://yadi.sk/d/YmaYJ4VMaduEg

how can I get the current position of my FPS camera and write coords (XYZ&rotY)  to the file? (at press f5)
and write and put FPS camera to saved coords at f9.

Advance thanks for explaining

Last edited by el_motoblock (29-Aug-2014 12:13:26)

Offline

#2 29-Aug-2014 18:13:46

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,091
Website

Re: savegame function

Hi !

You can achieve this using 3 plugiTs :

input keyboard
Object position
misc config file : http://www.openspace3d.com/documentatio … lugit.html

firt add the Object position instance
select the camera shell as object and disable the Set position on start
choose local coords

add the key board plugits with the corresponding keys.

add the misc config file plugit and disable load on init
add a variable name "userpos" and set the default value with position and orientation as :
0 0 0
0 90 0

then add a link
F5.Key down -> Object position.Get coords
Object position.Coords -> Config file.Set userpos
F5.Key up -> Config file.Save

F9.Key down -> Config file.load
Config file.userpos -> Object position.Set Coords

You can do the same with the camera object for better result.

This just point out that there is a missing action and event on the FPS plugIT to get it's complete position of the several nodes it use.
I'll do this quick

Offline

#3 30-Aug-2014 07:53:30

el_motoblock
Member
From: Russia
Registered: 16-Feb-2013
Posts: 270

Re: savegame function

not works. in save its writes 0.000000000000....
physically not performs especially
https://yadi.sk/d/MQaI8G3HagGBH

left my previous project? rooms.xos
when saving all data flied

Error while importing scene or group: .../.../rooms.xos

Last edited by el_motoblock (30-Aug-2014 08:31:41)

Offline

#4 31-Aug-2014 02:09:26

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,091
Website

Re: savegame function

Hi !

you found a weird bug smile

I corrected it and added the get position on navigation plugIT

here you scene modified with functional load / save position from navigation plugit
http://arkeon.dyndns.org/scol/rooms.xos

update the plugits files from

https://svn.scolring.org/trunk/scol_app … onfigfile/
and
https://svn.scolring.org/trunk/scol_app … avigation/

Offline

#5 19-Sep-2014 12:12:57

el_motoblock
Member
From: Russia
Registered: 16-Feb-2013
Posts: 270

Re: savegame function

im begin new project(level etc.) please make tutorial about "data saving" to file and read this.
https://www.youtube.com/watch?v=Rg3EKDYOBgc
is my attempt make the system of characters

Last edited by el_motoblock (19-Sep-2014 12:17:20)

Offline

#6 19-Sep-2014 14:24:23

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,091
Website

Re: savegame function

hehe not bad smile
ok I'll try to make one soon

Offline

Board footer

Powered by FluxBB