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.

AppGameKit Classic Chat / 3d Model 5 units above the floor Help

Author
Message
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 6th Sep 2020 08:03
So my player models collision only works correctly if there 5 units in the air.

If my players are directly on the floor they can not move.

Here is the basic set up I have for collision

I'm guessing there is a collision box that is probably 5 units to big.

fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 6th Sep 2020 12:01 Edited at: 6th Sep 2020 12:46
it may be the models positioning locator is set lower than the model itself and you need to reexport your model or set pivot point elsewhere in code

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 7th Sep 2020 02:30
Well I did that and still have the same problem. This I can fool the players by the camera position but during animated in game movies I can't fool anyone.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 7th Sep 2020 06:16
are they dynamic objects ?
what collision type are you using?

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 7th Sep 2020 07:13
I'm not setting them with anything as the collision code works. I'm not sure what to set them to as they are dynamic. Always moving.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 7th Sep 2020 07:42 Edited at: 7th Sep 2020 17:36
pretty sure its the pivot point but the type of collision may have an effect

do you have any of the games packs so you could examine both the models and code

from memory i think the pivot should be at the bottom of the model

sorry my hands are cactus or ide go through my stuff that solved it

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 8th Sep 2020 02:42 Edited at: 8th Sep 2020 02:44
Ok, I figured it all out but now cant climb stairs.

I will explain

So When we collect the old position first the y must match the new y and also match the raycast amount in order to be directly on the floor.

Here is a good example

This took me a whole day to figure out.

Now how to figure out a way to climb the stairs.

fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 8th Sep 2020 04:17
you do realise if you use character controllers all of that is taken care of https://www.appgamekit.com/documentation/Reference/3DPhysics.htm

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 8th Sep 2020 05:12 Edited at: 8th Sep 2020 06:24
To complicated, I tried to use a character controller with not luck at all, my model wont even move at all lol

But I will try to do this tonight once more to see if I can use a controller

Thank you for trying to help.
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 8th Sep 2020 06:26
lol

I just tried a character controller and my frames went way down, like to 20 to 30 frames with no cap

I will just stick with my code that runs at a perfect 60 frames with perfect collision.

Just need to figure out a slope
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 8th Sep 2020 23:10
I hate experiments like this because it takes away from real work to my application.

But I fully implicated the character controller and here is the results.

Many times with each load my player model would load out side of the level.

Every once in a while the frames will drop to almost nothing until I moved the character controller.

When I rotate my doors the character controller can not pass through the door as it still was recording the collision somehow. Many problems that I'm sure have work arounds but to much for me to keep track of.

I think what I can do is add some kind of slope model to the stairs and make it invisible.

Other than that stairs are not a good idea in appgamekit.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 9th Sep 2020 02:09
stairs are quite possible as you can see in one of my incomplete projects
the escalators are really just stairs

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 9th Sep 2020 10:53
Did you use regular collision like I am? Or a character controller? Either way I decided just to fool the players and have them 10 units in the air. It works well and the camera is close enough to look like there on the floor.

By the way, that looks like a fun game. I would like to play it.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 9th Sep 2020 12:25
your welcome to look at the code but its not really playable https://github.com/fubarpk/Macroaction

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 9th Sep 2020 12:40
Ok, lol, still it looks like a fun game if finished or polished off a bit.

I'll check it out.

Thanks.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 9th Sep 2020 19:24
please let us know how you go with it
btw the scene was setup up in blender using a modified version of blinks scene splitter
the new scene splitter has two types of path finding one is perimeter based and the other
invisible blocks used as path points. this is all dependant on how they are named in
blender before the scene is exported and there is code that imports/exports it

it started as a kinda elevator action crossed with a microsoft building full of zombies nowonder win 10 is bad lol

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 10th Sep 2020 00:38
Well I do know people love repetitive zombie games.

One game came to mind when watching the video.

That was plants versus zombies. Now if you could make this like that somehow with zombies versus papper or something similar that would be great.

I will look at the code today, I just got home.
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 10th Sep 2020 03:05
Ok so I looked and noticed that the position was different in your code and the size of the models are sized for everything.

So I lowered my player models before export and now there perfectly on the floor and go up the stairs perfect with perfect collision.

I guess appgamekit does not have the same position setup as other programs.

It is 15 units down in fragmotion and it works great.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 10th Sep 2020 04:32
glad you got it sorted

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk

Login to post a reply

Server time is: 2024-11-24 21:04:28
Your offset time is: 2024-11-24 21:04:28