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 30-Apr-2017 21:30:20

handywijaya82
Member
Registered: 30-Apr-2017
Posts: 8

moving object by touch input or mouse click

hi. i'm trying to move my object based on user input from touch or from mouse click, i've tried all object plugit, including getting the mouse click position but can't transfer those value (the position) to objec move to or such.

please enlighten me for a happy ending.

Offline

#2 30-Apr-2017 22:01:33

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

Re: moving object by touch input or mouse click

Hello,

it depends of the ergonomics you want but you can use the object control plugit and use the control link.
you can find more tips about control link on the forum :http://www.scolring.org/forum/viewtopic.php?id=1829

Offline

#3 1-May-2017 06:43:22

handywijaya82
Member
Registered: 30-Apr-2017
Posts: 8

Re: moving object by touch input or mouse click

thank you for your answer, it really help me. the thread you're mentioned about doesnt really giving me the solution i need, but it encourage me enough to try some similar technique. using the control plugit doesnt move my object, but using the moveto plugit and fill the parameter with $1 $2 0 $4 $5 $6 does the magic.
but the problem is, my object is moving without rotating it's orientation to the clicked spot. so how do i change the rotation? should i add rotate plugit?

Offline

#4 1-May-2017 10:45:10

handywijaya82
Member
Registered: 30-Apr-2017
Posts: 8

Re: moving object by touch input or mouse click

i just tried using the touch input, what works in mouse click doesn't work on touch input. is there any difference of the plugit beetween mouseclick and tap on touch?

Offline

#5 1-May-2017 12:15:33

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

Re: moving object by touch input or mouse click

sorry but I need more info about what you are doing to help you.
For orientation with the control plugIT this is the 2nd line parameter in link
X Y Z
AX AY AZ

Offline

#6 1-May-2017 18:09:07

handywijaya82
Member
Registered: 30-Apr-2017
Posts: 8

Re: moving object by touch input or mouse click

so in my project, i have this bee object, i want this bee object to be able to move to where i tap the screen.

this morning i success when moving the bee object with my mouse click (from pc test).

then i export my project to android, changing the mouse click plugit into multitouch inst -> object move to inst and use the parameter on the links (User

$1 $2 0
$4 $5 $6

the bee is in the middle of the screen on my android phone, when i tap on the bottom screen, the bee moved, only not to my tap position.

and one more thing. i've imported model from 3ds max, and choose to use the environment setting from imported scene, now it's all black, how to change it? i've checked the set environment to no result

Offline

#7 1-May-2017 18:37:31

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

Re: moving object by touch input or mouse click

Hello,

right click on scene node -> rendering settings to change the ambient color

you have an example in examples\basics\player_control\sin_mousemove.xos
you need a 3D object under the mouse to get the 3D position. So if you want you can add a plane and use the transhadow material on it.

Once you check the 3D position on mouse plugit you don't need the touch plugit to make it work, by default one tap make a mouse click.

Offline

Board footer

Powered by FluxBB