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.

Newcomers DBPro Corner / Stacking 3d objects on top each other?

Author
Message
Tucker
14
Years of Service
User Offline
Joined: 20th Jun 2010
Location: Earth Prime
Posted: 5th Nov 2010 03:09
Hey guys,
Is there any examples or code snippets that allow stacking boxes on top of each other? I can't buy box2d, so I need an alternative 2d physics type structure in dbpro. Objects stacking on x and y axis only.

I can not find any examples on the forums, so if you could share a small demo, It would be greatly appreciated.

Cheers

Hey look at that!
X_MEN
21
Years of Service
User Offline
Joined: 14th Sep 2003
Location:
Posted: 5th Nov 2010 05:30


You can do it if you try
Tucker
14
Years of Service
User Offline
Joined: 20th Jun 2010
Location: Earth Prime
Posted: 5th Nov 2010 08:19
But then the boxes need to continuously stack up, or fall over if they are too far on the corners of the one under.
Is this possible without any paid plugins?

Hey look at that!
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 6th Nov 2010 01:32
You could try Newton, although I haven't learnt to use it yet.

Tucker
14
Years of Service
User Offline
Joined: 20th Jun 2010
Location: Earth Prime
Posted: 9th Nov 2010 03:47
Alright, I have been messing around with some stuff.
With the code below, how would I go about making the right mouse click increase the blocks height instead of rotating which its currently doing? And also for sparky's to affect it if it placed on another block?



Any advice would be great!

Hey look at that!
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 9th Nov 2010 20:34
What you've got is pretty neat, but I seriously think it's overkill to try and write a full physics system using sparky's. I'm over my head with that code lol

Master Man Of Justice
16
Years of Service
User Offline
Joined: 13th Feb 2008
Location: Between Insanity and Intelligence
Posted: 9th Nov 2010 22:36 Edited at: 9th Nov 2010 22:36
I didnt actually incorporate physics, but i made a counter that shows how many times the physics should have rolled the box off.

I didnt use any equations or complicated maths.

i used X_Mens code and worked off of that.

Just something i made while eatin lunch.




Tucker
14
Years of Service
User Offline
Joined: 20th Jun 2010
Location: Earth Prime
Posted: 10th Nov 2010 01:52
So how would i go about making the box's in my code snippet be able to drop on one another like that, with collision?

Hey look at that!

Login to post a reply

Server time is: 2024-09-28 22:28:04
Your offset time is: 2024-09-28 22:28:04