Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Some 3D questions

Author
Message
XANAX 2B
21
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 23rd May 2016 08:21
Hello

I have some questions about 3D stuffs i would like to do.

1) How can i create an object box that always fit the width and height of the Screen ? (even when i resize it)
2) I have a 3D dice with a size of 0.8, how can i fix his pivot at his center ?
3) How can i get the local angle X, Y & Z of this dice ?
4) When i use 3D physics, the SetObjectPosition seems to be not working. Should i do something to change that ? How should i proceed ?
God is ALIVE
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 23rd May 2016 09:35
resize maybe with
GetDeviceHeight
GetDeviceWidth
GetScreenBoundsBottom
GetScreenBoundsLeft
GetScreenBoundsRight
GetScreenBoundsTop

screen to 3d for the box fit the screen
Get3DVectorXFromScreen
Get3DVectorYFromScreen
Get3DVectorZFromScreen

FixObjectPivot

GetObjectAngleX
GetObjectAngleY
GetObjectAngleZ

4. don't know
AGK (Steam) V2.0.18 : Windows 10 Pro 64 Bit : AMD (15.30.1025) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 23rd May 2016 15:11
https://forum.thegamecreators.com/thread/216683
The coffee is lovely dark and deep,and I have code to write before I sleep.
XANAX 2B
21
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 23rd May 2016 16:03
Thanks.

Quote: "screen to 3d for the box fit the screen
Get3DVectorXFromScreen
Get3DVectorYFromScreen
Get3DVectorZFromScreen"


This return always 0 or 1. With what Width & Height should i multiply this ?

Quote: "https://forum.thegamecreators.com/thread/216683"


I've made dices that you can throw, but once they touch the ground, SetObjectPosition don't seems to reposition them at their start position.
God is ALIVE
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 23rd May 2016 18:08
Quote: "I've made dices that you can throw, but once they touch the ground, SetObjectPosition don't seems to reposition them at their start position."


https://forum.thegamecreators.com/thread/216683
The coffee is lovely dark and deep,and I have code to write before I sleep.
XANAX 2B
21
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 23rd May 2016 18:32
Thanks.

Just a last question : how to check if an object is sleeping ?
God is ALIVE
AreCustomize
10
Years of Service
User Offline
Joined: 22nd Dec 2013
Location: Cyberspace
Posted: 23rd May 2016 19:19 Edited at: 23rd May 2016 19:22
Quote: " Just a last question : how to check if an object is sleeping ?"


http://www.appgamekit.com/documentation/Reference/3DPhysics/SetObject3DPhysicsCanSleep.htm

"All dynamic objects are automatically put to sleep at rest. This will stop the dynamic object from being automatically put to sleep."
Quote: ""Anyone who has never made a mistake has never tried anything new."
-Albert Einstein"
XANAX 2B
21
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 23rd May 2016 22:51
Yes, but when i roll my dices, how to check if they do not move anymore ?
God is ALIVE
XANAX 2B
21
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 23rd May 2016 23:45
Okay, i've just tested first if all the dices have hit the table.
And after, i've just compared the old and new angles values : when nothing moves, the angles are the same.

Thanks a lot
God is ALIVE
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 24th May 2016 00:28
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 24th May 2016 00:34
you can also check the Velocity
SetObject3DPhysicsSleepingThreshold

GetObject3DPhysicsAngularVelocityX
GetObject3DPhysicsAngularVelocityY
GetObject3DPhysicsAngularVelocityZ

GetObject3DPhysicsLinearVelocityX
GetObject3DPhysicsLinearVelocityY
GetObject3DPhysicsLinearVelocityZ
AGK (Steam) V2.0.18 : Windows 10 Pro 64 Bit : AMD (15.30.1025) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
XANAX 2B
21
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 24th May 2016 05:30
Thanks
God is ALIVE

Login to post a reply

Server time is: 2024-11-25 05:17:36
Your offset time is: 2024-11-25 05:17:36