3D Object and Prop Help

Sooooooooo, Ive been working in secrecy making a 3D game which has come out better than expected, BUT i need help, my system uses a way to project what the player object is seeing by broadcasting multiple of the same sprite the closer you get to give it a depth feeling

BUT theres an issue, i need to make props and enemies by only projecting 1 sprite at a time but with how i set it up im lost in how to do so and ive tried to use raycasts but somethings wrong with the sprites hitbox making it broadcast when it hits the sprites corner
TO the point is i need help finding a way to make my system single it down to 1 sprite shown at a time

And @DraftyScienceCoat75 i know you’ve had experience with 3d stuff before so any help from you?

LINK: Flowlab Game Creator - New Game

5 Likes

I think I understand your problem. What I did was I used math with an object’s position, the player’s position, and the players rotation.
Here I projected a single traffic cone sprite.

I move the “display” sprite horizontally based on the angle the player is looking and the direction of the cone.
The cone moves slightly down as the distance to the cone decreases.
The size also increases the closer you get to it.
I also change the order of all the “display” sprites based on their distance to the player

4 Likes

I was trying to base mine of yours originally but i could never find what the heck pov was in the scripts, could you make like an example with just the cone or object?

3 Likes

What do you mean pov? the position of the player, the cone, or do you mean the fov?

3 Likes

There was a world value named POV

1 Like

image
I’m pretty sure you mean this?
I set it in the lineSpawner object. I made it so that you can change the value and things will still work

3 Likes

Ah ok, Is the line spawner necessary tho?

1 Like

Anyways but yeah if you could make an example of the cone alone would be much appreciated

1 Like

it’s not necessary, as long as you don’t change the fov.
I have the line spawner so that if you change the resolution or the fov it can spawn a different amount of “display” objects, and the game can run better
I’ll go ahead and try to make an example of just the cone though :slight_smile:

1 Like

Ah thank you so much :slight_smile:

1 Like

And yes welcome to the Wolfenstein and Doom crossbred abomination

Ok so I deleted a bunch of things and added notes, hopefully this helps

5 Likes

Ok theres a slight issue i need help with… so the walls use a raycast that stops at first object and a prop would block the veiw making the wall disappear behind the item… any thing i could do o fix that?

There is an option in the raycast to not stop at the first object, using that should work

Well the issue originally was that the walls became darker and transparent (Meaning you could see the walls behind the walls) as you walked away, but ive fixed it so it only gets darker resolving the issue entirely

1 Like

On let me give you an update, so your systems great and works awesomely, but its built for your specific 3d system, i however wont be able to use it but the example has helped me by giving me ideas on how to execute one

2 Likes

glad I could help :slight_smile:

1 Like

Ok, So ive singled it down to the bare nothing you need for it to work
1 Projects display object relative to its 2d correlation using advanced math
2 Needs to work like my walls to have the same style

But im having a literal stroke trying to do this, any ideas? Cause i aint no math man and im unsure on how to make it work like my walls

1 Like