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.

Author
Message
Silence
13
Years of Service
User Offline
Joined: 14th Oct 2012
Location:
Posted: 22nd Feb 2013 21:56
So, I've made a house that the player can walk through the walls and all the other models with ease. I have set the automatic camera collision but the model still walks through the walls with the camera still being left behind.




This is the code that keeps the player inside the world without falling out. How can I mimick this to but a collision around the house except one area where the player can walk through and into the house?
Nytus Sermus
13
Years of Service
User Offline
Joined: 17th Jan 2013
Location:
Posted: 22nd Feb 2013 22:08 Edited at: 22nd Feb 2013 22:11
what about using

AUTOMATIC OBJECT COLLISION Object Number, Radius, Response
(from Helpfile)

Object Number

Integer
The object number
Radius

Float
The objects with automatic collision will use a collision sphere of the specified radius
Response

Integer
If the response value is set to one, the new position backtracks to the last collision free position when a hit occurs. A value of zero adjusts position for sliding collision

This command does not return a value.

Automatic collision takes over the task of adjusting the object when it hits another object in the 3D scene. Objects with automatic collision use a collision sphere of the specified radius, ignoring its previous collision shape. If the Response value is set to one, the new position backtracks to the last collision free position when a hit occurs. Spheres and boxes are solid objects, and so collision can only occur when they collide together. When an object is entirely within another object, even though the geometry is not touching, the collision is still valid as the larger object would be a solid construct.



EDIT:
just trying a quick reply that might help you some because i havent overcome all these tasks yet myself

You could be done already.....stop trying to re-invent the wheel.
Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 22nd Feb 2013 22:36 Edited at: 22nd Feb 2013 22:37
Have you tried something simple like:

IF OBJECT HIT(Player, Wall)


...or you could simply disable your player movement when a camera collision is detected.

D.D.
Silence
13
Years of Service
User Offline
Joined: 14th Oct 2012
Location:
Posted: 25th Feb 2013 16:09
Thank you Nytus Sermus but Derek Darkly, I think your idea sounds easier. How can I disable movement if a camera collision is detected?
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 25th Feb 2013 16:39
Quote: "...or you could simply disable your player movement when a camera collision is detected."


That is the reverse of what it should be... in my view anyway...

I tend to have the camera follow the object, thus if the object stops, the camera stops, but I include some leeway so that it moves and kind of springs[Elastic]... see my project for an idea of what I mean...


You can see in the video when the ball is boosted the camera gets closer as the ball is moving towards the camera however there is a limit applied to it...

You can download the demo here to experience it for yourself:

http://www.akaneaya.com/volcanicadventures/

However for the physics I am using DarkPhysics in that demo, however I have since bought DarkDynamix and thus I will be updating the physics engine in future...

I use the command:

Quote: "
SET CAMERA TO FOLLOW
"


For the camera movement... you can set it to the flexible elastic movement as I have or keep it solid to place it inside a head of a character as far as I can see

Hope that helps... and let me know if you need more depth for the command...

Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 25th Feb 2013 18:59
Quote: "How can I disable movement if a camera collision is detected?"


Well since you're doing 3rd person (player on-screen) instead of 1st person you might want to try a combination of Nytus Sermus' and MrValentine's suggestions:

Try AUTOMATIC OBJECT COLLISION for your player collision.

For the camera to follow the player, learn the ADD LIMB command.
You can add (and hide) a simple object like a small cube to your player, then OFFSET LIMB the distance you want the camera from the player. Then simply POSITION CAMERA every loop to the coordinates of the limb.

If that wasn't explained well enough, I'll be glad to post a sample code.

D.D.
Silence
13
Years of Service
User Offline
Joined: 14th Oct 2012
Location:
Posted: 26th Feb 2013 16:31
I'm sorry everyone, but no matter what I try it doesnt seem to work :c. Would you all mind if I post up my code and see if you guys can fix it for me and tell me what's wrong?
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 26th Feb 2013 16:52
Go for it

Silence
13
Years of Service
User Offline
Joined: 14th Oct 2012
Location:
Posted: 26th Feb 2013 21:40
Thank you!
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 26th Feb 2013 22:02
Just in case anybody missed it, Silence attached a file to his post just there...

pcRaider
19
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 27th Feb 2013 00:38
Go for it
Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 27th Feb 2013 16:38
Hey Silence,

It would be a lot easier to run your code if you included all of your models, textures and bitmaps!

D.D.
Silence
13
Years of Service
User Offline
Joined: 14th Oct 2012
Location:
Posted: 27th Feb 2013 20:26
It's quite a bit large to include everything. It's a whole folder filled with it and the file is in it. If anyone would give me their email I would gladly send it to them.
Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 27th Feb 2013 21:09
You can make a ZIP file by highlighting the parent folder, right clicking then "Send to compressed folder"

(You can upload up to 100mb here in the forum.)

D.D.
Silence
13
Years of Service
User Offline
Joined: 14th Oct 2012
Location:
Posted: 28th Feb 2013 21:47
It wont let me
Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 28th Feb 2013 23:26 Edited at: 28th Feb 2013 23:27
Quote: "It wont let me"


Won't let you make a ZIP file, or won't let you upload it?

D.D.
pcRaider
19
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 2nd Mar 2013 00:41 Edited at: 2nd Mar 2013 00:55
This is a sc_sphereslide-test code.
use Sparky's Collision DLL .
pcRaider
19
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 3rd Mar 2013 00:44
This is test code.
TPS intersect collision
pcRaider
19
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 3rd Mar 2013 10:08
This is test code.
TPS sliding collision
Silence
13
Years of Service
User Offline
Joined: 14th Oct 2012
Location:
Posted: 4th Mar 2013 16:53
Dx it wont up load Derek Darkly. pcRaider, I tried each code but they wont work either :c
Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 4th Mar 2013 19:21
You could upload your Zipfile to a free hosting site like www.zippyshare.com (i have used this site before with no problems)

D.D.
Silence
13
Years of Service
User Offline
Joined: 14th Oct 2012
Location:
Posted: 7th Mar 2013 04:07
Thank you all, but I solved the problem by making the walls in blender and putting the collisions on them from there instead. Very handy tool~
Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 7th Mar 2013 20:31
If it's not too much trouble, would you describe briefly how you did this?

I know you can make entire games in Blender, but I've never tried anything involving collisions. Is it easy?

D.D.
Silence
13
Years of Service
User Offline
Joined: 14th Oct 2012
Location:
Posted: 7th Mar 2013 21:41
Very very easy actually. I made my wall in blender, and on the right of Blender you will see "Colors, textures" then a small icon with a ball bouncing. Click on that and then apply "collision" onto you model. Now the model as a collision barrier. All you do then is convert to .x file then upload into your game. The collisions go along with it.

Login to post a reply

Server time is: 2026-07-07 20:23:47
Your offset time is: 2026-07-07 20:23:47