#Mod Broken (not anymore)

91 messages ยท Page 1 of 1 (latest)

thorny sage
#

somebody explain how this can happen

#

so basically this won't set if it is "equipped" or assign the "it" as the "item's" "obj" and instead only calls the audio

#

ok nvm turns out I was checking if the player wasn't in a seat when they had a weapon to despawn it, silly mistake LaughingDog

empty harness
#

whats this going to be?

thorny sage
surreal knoll
#

Excited to see what you make ๐Ÿ‘€

thorny sage
#

Mod Broken (not anymore)

empty harness
thorny sage
empty harness
#

well no

#

But i assume youd wanna angle your gun up and down

thorny sage
# empty harness But i assume youd wanna angle your gun up and down

trying to figure out how to turn the simple direction vector between the mouse position and the gun position into euler angles (with the cross between it and the player's transform's right vector as the up vector) so I can rotate the gun to point towards the mouse up/down position

empty harness
#

I just meant something like press q to aim gun up press e to aim gun down

thorny sage
empty harness
#

scroll wheel?

thorny sage
#

you can assign scroll wheel?

empty harness
#

probably

thorny sage
empty harness
#

ig youre gonna have to use some other buttons

empty harness
thorny sage
empty harness
#

so

#

press f4
click on thing
gun now aims down
press f4 again
I can finally shoot downwards

thorny sage
#

why need to press f4?

#

nvm, button ui would probably need you to press f4, probably wouldn't make the gun aiming up/down toggle a button though LaughingDog

empty harness
#

i meant pressing f4 and clicking on terrain

#

since you mentioned "mouse position"

thorny sage
empty harness
#

hmm tbh i kinda wanna mess around with making a weapon system too

empty harness
#

didnt realize that the fp controls are the same as tp

#

so the character doesnt strafe

thorny sage
#

is it possible to rotate the player?

empty harness
#

me every 5 seconds while tm modding:

#

why

empty harness
thorny sage
thorny sage
empty harness
#

you can only move if your input roughly matches the direction you set

thorny sage
#

if so you could probably teleport the player backward by the same speed their walking forward, whatever speed that is, and if not then you can just teleport them to the right, left or backward more to try and add strafing or something similar

empty harness
#

at the end i was pressing A/D and then S not W

#

so yeah basically you cant do anything about it

#

sweet

thorny sage
#

strafing! (sort of) (walking left/right and forward needs fixing though)

#

I should also probably make it so if you're walking left/right and walking forward then stop walking forward the strafe rotation is set to a 45 degree rotation of the player's instead

empty harness
thorny sage
thorny sage
empty harness
#

i didnt

empty harness
#

idk what kind of collision box the game gave to this pistol but it sucks

thorny sage
empty harness
#

where does the mouse click raycast even come from? it feels like its either coming from the stomach or its a spherecast

empty harness
thorny sage
empty harness
#

the fuck

#

doesnt seem like it works for that either

thorny sage
empty harness
#

its one object

thorny sage
#

ok

#

had that happen when I tried replacing the player with a chirpo, I couldn't fix that either so I just used concave collision instead because it doesn't just push you out of it when the player is inside it and lets you walk outside of it's collision, though idk how to fix the issue with the gun

thorny sage
# empty harness i didnt

ok I got it to work sort of (gun not rotating yet because just making sure it works before I add it)
(I took the difference between the player position + (0, 1, 0) and the mouse position as a direction)

empty harness
#

nice

thorny sage
#

although it doesn't work if I look down

empty harness
#

the raycast is fucked up as hell

#

devs please fix

thorny sage
empty harness
#

its not the gun for sure because even after moving it up a lot, the issue still exists

thorny sage
empty harness
surreal knoll
#

Trailmakers is my favourite fps game

shrewd nacelle
# empty harness like

Could you maybe pass some code snippet so we can easily replicate the issue on our end? ๐Ÿ™‚

#

And you confident it is not the rotation of the gun that is incorrect?
Ex. have you tried moving a cube or something to where the raycast hits, just to verify that it does in fact not hit where you expect it to hit? Or hitting some other collider (that you cannot see or whatever)

#

EDIT:
Just rewatched the last video, looks weirdly off PoliteCat

Code snippet with easy replication would help a lot in getting this fixed!

thorny sage
shrewd nacelle
#

ah was hard to see what was happening, thought it was just pointing forward. Yeah looks like the raycast might be hitting the head of the character (or something similiar)

thorny sage
#

it seems almost like as if it's on the top of a capsule and it has some number for the minimum distance, but it still intersects with the capsule, but around the top and side curvature it doesn't, at least, that's something I can relate it to

#

here I've added lines to an image of a capsule, at around the same distance to the origin of the camera, and toward the top of the capsule it doesn't intersect, same should work horizontally, though the bottom and center do intersect, which is the same behaviour I've experienced ingame, or atleast something similar, I'm sure you're using different colliders for the player, and it seems to be in more of the shape of the players head

#

idk ๐Ÿคทโ€โ™‚๏ธ I could be completely off

shrewd nacelle
#

We will investigate later; but if thats the case it would just make sense to ignore the character colliders ๐Ÿ™‚

thorny sage
#

if that is the case, would it be possible to only ignore the current player's collider when in 1st person?, so I still have the ability of getting a point on another player (would be used for weapons in pvp, ect.)

shrewd nacelle
#

I was mainly refeering to the local player and not general players.

But yeah there is also some usefulness in being able to click on your own character in third person. I'll ensure to document these requests.

thorny sage
#

in 1st person, spawning 0.01 scale cubes at the mouse position and rotating the camera in a spiral downward gave this structure, which fits mostly within the character's head model

empty harness
shrewd nacelle