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.

DarkBASIC Professional Discussion / Sparky collision help

Author
Message
haliop
User Banned
Posted: 2nd Apr 2012 14:29
hello im having a problem with the collision system.

everything is setup as sparky shows in his tutorial examples etc
but
when i run it instead of seeing the player above ground level (object)
i see only his head and nothing else, like he is falling too much a picture to explain :

haliop
User Banned
Posted: 2nd Apr 2012 14:31
i am not using AllowObjectScaling cause i scaled the X file to fit the game scene outside DARK in blender.

i dont know what to do
if i increase the raduis of the collision check i cant walk to simple places in the map cause the collision is too big.. just want it to stand up normally.

can someone help , if so i will thank you very much.
haliop
User Banned
Posted: 2nd Apr 2012 15:27
or is there a newer way to catch collision i would most want to hear about ..
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 2nd Apr 2012 15:27 Edited at: 2nd Apr 2012 15:29
Looks like the root of your object is at it's neck and your collision sphere will therefore be there. You can either:

-Create a dummy object, hide it and use that for the collision. Then just set your player position to the dummy objects position every loop, plus some additional height on the y-axis.

OR

-Use the offset limb command, to move the center point of your player. Do offset limb, object, 0 (this is the base limb), 0, 10 (or whatever additional height you want to add), 0. So OFFSET LIMB obj,0,0,10,0
Do that before you setup the collision sphere.

OR

-Export your model again with it's origin at it's feet

haliop
User Banned
Posted: 2nd Apr 2012 15:36
already tried the last one , change the root to its feet but it didnot worked.. i'll try now the second with the offset.
haliop
User Banned
Posted: 2nd Apr 2012 15:38
also the current root is directly in the middle using blender calculations.. so its wierd i shouldnot have this problem but well.. i guess there is a bug or something
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 2nd Apr 2012 15:47
Have you made sure the object is above the floor before you've set the collision on. If it's already inside the floor cube, it won't move above it. It needs to be above it to start with.

haliop
User Banned
Posted: 2nd Apr 2012 15:52
ok
so i guess the model .x was kinda bugged still new to this stuff

here is an image after changing the offset root that helped however it kinda bugged the model itself

i will rebuild a new model i think this one is bugged however
thanks for the help it works ok now.

haliop
User Banned
Posted: 3rd Apr 2012 19:05
ok this is just a thought but maybe the collision system detected armature limbs before the actuall polygon data .. interesting , that is why it was too low , since when im creating a bone structure i start at the first spine where it is near the pelvis area , so its relativly low to the mesh data...


checking to see if that was the bug .. cause if i want to export animation from blender it will export the armature , so i have a new rig and i'll start the spine at the Center of the mesh, see how thats works out.
haliop
User Banned
Posted: 3rd Apr 2012 19:36
ok i made a new rig
here are some problems im expriancing.

first , the root detected by the collision system (sparky's) do not take the armature as main root limb.

second, there is a problem with scaling , once you scale it even if you use AllowObjectScaling id it dosent really works..

so im sizing it inside Blender but no effect in game still small

honestly i dont know how to size my model since in blender it takes no effects selecting the model pressing "s" then 2 , size it 2 times it shows ok inside blender but not within Dark.

anyone has any idea on how i can size my model to fit the scene but also keeping the collision data sized aswell..

any help will be appriciated .
ty nadav.
haliop
User Banned
Posted: 3rd Apr 2012 19:40
ok found why the scaling inside blender dosent work right.

well , once it is rigged and animated you cannot rescale it unless you declare it inisde the animation " hey a scale action done on frame ## "

so , luckly for me i have only 40 frames , should be easy enough to rescale the model, so one thing to know for next times :

check inside Dark the right scale then return and animate.
haliop
User Banned
Posted: 3rd Apr 2012 19:41
damn , even after rescaling the collision data went wrong.
im trying to think maybe to find a new collision system to use..

Login to post a reply

Server time is: 2026-07-09 22:48:53
Your offset time is: 2026-07-09 22:48:53