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 6-Sep-2019 11:11:55

Coder108
Member
From: Moscow
Registered: 6-Sep-2019
Posts: 14

Move mesh object by mouse at runtime

Can someone advise on how to do it? Tried almost every combination with different plugits but still no luck. I want the object follow the mouse when it's clicked and dragged. Could only achieve some jumps to where mouse is clicked. Thank you!


My programming background is HiAsm and MQL4, PHP, JavaScript.

Offline

#2 6-Sep-2019 11:33:57

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

Re: Move mesh object by mouse at runtime

Offline

#3 6-Sep-2019 12:24:52

Coder108
Member
From: Moscow
Registered: 6-Sep-2019
Posts: 14

Re: Move mesh object by mouse at runtime

Thank you very much! But my right mouse click does not move the cube.. Here's my log:

> Action : Scene.switch position.Input with param : NIL and reply param : NIL
> Event : Scene.mouse inst.MouseMove with param : NIL
> Action : Scene.switch position.Input with param : NIL and reply param : NIL
> Event : Scene.mouse inst.MouseMove with param : NIL
> Action : Scene.switch position.Input with param : NIL and reply param : NIL
> Event : Scene.mouse inst.MouseMove with param : NIL
> Action : Scene.switch position.Input with param : NIL and reply param : NIL

Last edited by Coder108 (9-Sep-2019 10:21:08)


My programming background is HiAsm and MQL4, PHP, JavaScript.

Offline

#4 6-Sep-2019 12:44:49

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

Re: Move mesh object by mouse at runtime

the mouse must be over another object else it can't compute the 3D cursor position without raycast

Offline

#5 6-Sep-2019 23:30:11

Coder108
Member
From: Moscow
Registered: 6-Sep-2019
Posts: 14

Re: Move mesh object by mouse at runtime

So it is not an easy task to provide some example where I can move cube mesh at runtime and drag it on the screen? Sorry for asking for code)
For example if I want to create an VR app where one can place furniture (chairs, lamps, etc) where he likes to by dragging them with mouse. How can I handle this functionality? You example was interesting and helpful to some extent but still I do not know how to do it.


My programming background is HiAsm and MQL4, PHP, JavaScript.

Offline

#6 9-Sep-2019 08:06:01

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

Re: Move mesh object by mouse at runtime

Hello, we made the Object handler plugit for that compatible with VR smile

Offline

#7 9-Sep-2019 10:18:43

Coder108
Member
From: Moscow
Registered: 6-Sep-2019
Posts: 14

Re: Move mesh object by mouse at runtime

Hello arkeon, yes I saw those plugits, but still was unable to move object as desired. May be I need a simple working example project, I think it will be of great use to all other users, as this is a key functionality of interaction with objects in 3D world..


My programming background is HiAsm and MQL4, PHP, JavaScript.

Offline

#8 9-Sep-2019 13:27:03

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

Re: Move mesh object by mouse at runtime

Object handler gives a dedicated ergonomic to move, rotate or translate objects with mouse or in VR.
To make such complexe interaction with a different ergonomy you will need to make your own plugit.

Offline

Board footer

Powered by FluxBB