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 / is there a way to perform a csg on a collision box too?

Author
Message
T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 4th Jul 2011 12:49
is there a way to perform a csg on a collision box too?

an image says more than 1000 words =)

color red is what is left from a csg made on a collision with another object, but the black color is the collision box, how to change that to the new mesh?

goal: if theres a new collision between two objects the brush object will not collide against the collision box but will against the new generated collision box. and thus perform a new csg between the two objects.

if not possible with csg how will i make the new collision box?

picture:
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 4th Jul 2011 16:13
Quote: "is there a way to perform a csg on a collision box too?"


I don´t use this kind of collision as it is to limited, but perhaps you could do the csg to a similar box and hide the one you are using with collision box.

There are as you must know a lot of collision systems, Sparky´s the best and is not to complicated. Have a look to this other collision system in this example...it works in all coditions of collision.

Cheers.

I'm not a grumpy grandpa

Attachments

Login to view attachments
T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 4th Jul 2011 16:33
ok, will try that, ty
T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 10th Jul 2011 17:47
i have replaced my collision commands with your example but, i have the same results. the collision box stays the same.

is it possible that i need to save the new mesh and reload it everytime? and thus that dbpro makes a new collisions box everytime?

what i do is ingame making a csg on the collision box from the object. but the problem is that the collision box will not change to the new mesh (with the gap).

any thoughts on this?
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 10th Jul 2011 18:29
Quote: "but the problem is that the collision box will not change to the new mesh (with the gap)."



If you use my collision instead of collision box, you can update collision every time you make a hole in a box or a wall or wherever you want.


Cheers.

I'm not a grumpy grandpa
T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 10th Jul 2011 22:32
i did, but stays the same.. or iam doing something wrong.

what i do is doing the csg and (tried) to update the collision on the new mesh, but thats not working, or are my thoughts wrong?

first i set the object collisions like this:



and then if theres some collision i do this:



do i miss something here?
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 10th Jul 2011 23:04
What collision system are you using ?....can you put your code ? perhaps I could help you.


Cheers.

I'm not a grumpy grandpa
T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 11th Jul 2011 01:04
Quote: "What collision system are you using"


well ehm... dont know actually. the collision and stuff is really new for me. just hoping it would work this is the first game i use collision.

i thought the code above was enough for it. can you point me in the right direction? any help is appreciated.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 11th Jul 2011 03:03
What do you need exactly ? The collisiom system I showed you works perfectly...I supose you want to open holes like doors on the wall and go through it...it that what you need ?

Cheers.

I'm not a grumpy grandpa
T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 11th Jul 2011 12:29
iam gonna try to explain what i need:

i have a box for a tower and a box for throwing. if i throw the box against the tower and they collide against each other than the throwing box will make a gap in the tower box. thats goes good.

if i throw a second box against the tower on the same spot then the collision box or collision mesh or whatever is not updated to the new mesh with the gap. so the throwing box hits a hidden surface of the old collision box. but i wanted to have hit to the new mesh. i try to find a solution for that.

can you follow me?
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 11th Jul 2011 13:30
Yes I have understood you. I would do it making a csg where the box hit, but first I will set object to polygons though that don´t work for you..mmmm what about making the tower with several pieces (boxes) ? so every time you hit with it, you just delete one part of it .


Cheers.

I'm not a grumpy grandpa
T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 11th Jul 2011 14:43
Quote: "what about making the tower with several pieces (boxes) ?"


is not a option, because the box object was a test object and i will replace that for a cylinder. so the csg will leave round gaps. and i want collision on the new gaps.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 11th Jul 2011 16:12
Ok ...in this other example, I show you, how you can go through the gaps that you make in the level. When you press mouse left buton, it makes a hole in the direction you look. This is a poor level ... enough to show that it really works. I hope it can help you.

I'm not a grumpy grandpa

Attachments

Login to view attachments
T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 11th Jul 2011 18:36
thank you for your effort to make a example, but unfortunately your example doesnt work by me, if i do click with my mouse then the screen goes black.

for what i understand from your code is that you dont have collidsion code on your camera and thus can it go trough the hole.

but, theres no camera involved for the csg and collision only 2 objects. i just want to update the collision hull to the new generated mesh. thats all.

if you want i can give the source and media and the compiled project so you can look what i mean. do you have a email or something? (and only if you want to)
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 11th Jul 2011 20:31
@T4r4ntul4
I`m trying to help you like I help my little grandson with his math ...don´t worry and show me what you have...I will have a look at it .

Cheers.

I'm not a grumpy grandpa
T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 11th Jul 2011 21:30
do you have email? i dont want to spoil my code here

or mail me at dp-pro(AT)hotmail.com (replace the (AT) for a @ )

Login to post a reply

Server time is: 2024-11-22 18:22:17
Your offset time is: 2024-11-22 18:22:17