Q3D V-2.4 [3D Physics + Skeletal Animation UPDATE]

Post your completed addons to share with the community

Post » Wed Apr 20, 2016 10:32 pm

I trying to figure out how to use the Q3D Oimo Physics for player/vechicle gravity movement and also using gravity on Z axis somthing box2d can't do for pulling and pushing the objects for angled top down 3d camera view.

with regular box2d physics I am using the apply force at angle for movement and using torque for turning.

this is what I am using now -

Apply Physics force value # at angle self.Rz
ApplyPhysics torque at -# value

What is the equlivent on Q3D Oimo Physics behavour, as I do not see any angles in the physic force and torque actions, I see offset's but so far I have not been able to recreate the same gravity movement like in and box2d.
B
11
S
4
G
1
Posts: 25
Reputation: 1,387

Post » Thu Apr 21, 2016 7:01 am

@techjunkie

"angles" don't particularly exist in any simple way in 3D. For this reason 3D physics use vectors to indicate directions of forces/torques (this is pretty standard practice, you wont find much 3D math/physics relying on a system which uses angles since they can have weird singularities/gimbal lock). You'll have to apply 3D force with the directions/components of the angle you want to point at. use sin/cos. something like x:cos(self.Rz),y:sin(self.Rz), depending on how you want your coordinate system set up.
B
78
S
13
G
8
Posts: 1,974
Reputation: 9,918

Post » Thu Apr 21, 2016 7:19 am

ok thanks I have only used box2d physicis behavour up to this point and its not the same, I guess it dumb'd down by hiding what going on it background, I have some basic direction and rotating movement working and basic collisons, just the turning on angles. there not allot of information or any examples on how to use that physics behavour. Is Q3D Oimo Physics based on Oimo.js ?

So I see I have some research and reading to do on this, that helps me thanks

QuaziGNRLnose wrote:@techjunkie

"angles" don't particularly exist in any simple way in 3D. For this reason 3D physics use vectors to indicate directions of forces/torques (this is pretty standard practice, you wont find much 3D math/physics relying on a system which uses angles since they can have weird singularities/gimbal lock). You'll have to apply 3D force with the directions/components of the angle you want to point at. use sin/cos. something like x:cos(self.Rz),y:sin(self.Rz), depending on how you want your coordinate system set up.
B
11
S
4
G
1
Posts: 25
Reputation: 1,387

Post » Thu Apr 21, 2016 4:49 pm

@techjunkie

Yes, it's based on oimo.js, however I've modified it somewhat to include extra features/fix bugs.
B
78
S
13
G
8
Posts: 1,974
Reputation: 9,918

Post » Mon Apr 25, 2016 5:55 pm

techjunkie wrote:Sam Mortimer -> there is a set resolution action in Q3D Master.

Doesn't fix the bug, but it does provide a semi-solution: I've made the game so that when the player sets render quality to low and q3d is being used, construct 2 render quality actually remains high but the q3d master renders at a lower resolution.

This almost works, except the non-q3d hud elements on top are still rendered high quality. Meh.
B
8
S
1
Posts: 54
Reputation: 824

Post » Wed Apr 27, 2016 1:13 pm

@QuaziGNRLnose hi sorry for re-posting this question but ... by any chance can you share a capx that shows how to generate a terrain map? similar to one of this examples?

i tried creating a new plane and play with the settings but i have no idea what im doing ... a simple capx file wold help a lot ... that if its even possible...


Edited: have played a bit more with some objects and manage to do this next test... i know my math is spaghetti meat balls... but for some reason i cant manage to make the block turn and look towards the right direction any math guru can help me? :)

basically i want the blocks when they are created to face and rotate towards the next one in front of it (deeper Z or with a higher Z value) so the final look should be like a low poly road made out of boxes.... that binds into a hill climb left right cornering similar to @r0j0hound outrun plugin... but not having the image point in the margin of a image its a bit difficult cause increasing the size of the road wold not morph properly...
B
78
S
23
G
69
Posts: 1,353
Reputation: 43,985

Post » Thu Apr 28, 2016 4:52 am

@gamecorpstudio

Q3D can't really do what that example does in an EASY way. The only way would be to write a custom vertex shader (this is not something Q3D trivializes, you'd need to be pretty good at javascript and GLSL and know how three.js/Q3D work).

You could of course just import a model of terrain though if you want static terrain, or use morph animation to fake the wobbliness. Getting collisions to work would be a whole other story too.
B
78
S
13
G
8
Posts: 1,974
Reputation: 9,918

Post » Fri Apr 29, 2016 9:21 pm

:)
Last edited by techjunkie on Sat Apr 30, 2016 5:58 pm, edited 55 times in total.
B
11
S
4
G
1
Posts: 25
Reputation: 1,387

Post » Fri Apr 29, 2016 10:13 pm

If anyone else is having a problem downloading the plugin after buying, check your spam folder...

Gmail sent mine to spam.
Eat ALL THE BACON!
B
47
S
17
G
3
Posts: 290
Reputation: 5,068

Post » Sat Apr 30, 2016 3:26 am

@QuaziGNRLnose ... just wanted to leave this one here in case you did not know about it... on r227 x64 Error Image

happens both on chrome and nwjs and pretty sure firefox also.. its some code line in the plugin i guess... cheers :)


and some random giffy :P Work in Progress
B
78
S
23
G
69
Posts: 1,353
Reputation: 43,985

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: Nandynho and 3 guests