#blueprint

402296 messages · Page 563 of 403

proud hull
#

There are way too many ways to accomplish the same thing in programming so giving an exact answer on which practice is best is impossible. It is all about your project's specific needs.

glacial eagle
#

@pine trellis go into 'Options' in the launcher for that engine install, and download debug symbols

#

You may need to install VS to step through though

pale grotto
#

I need to work with input axis values a lot, so thought of making it a different script alltogether

pine trellis
#

I have VVs

glacial eagle
#

In that example @pale grotto the helicopter would be a pawn, so the input would be done there

#

@pine trellis no

#

Go into the launcher, and select the options from the drop-down menu next to your engine install

#

There's an option in there to also install debug symbols

#

And C++ source code

#

You'll need both really to debug properly

pine trellis
#

I would still use the development option once I get the debug symbols???

pale grotto
#

In that example @pale grotto the helicopter would be a pawn, so the input would be done there
@glacial eagle Many thanks, I'll try this method.

#

In that example @pale grotto the helicopter would be a pawn, so the input would be done there
@glacial eagle Probably making a .h file for input and including it in the pawn ?

pine trellis
#

@glacial eagle do I just p ick the debug symbols right? not everything else ?

glacial eagle
#

yep

#

you would override SetupPlayerInputComponent() from APawn

#

Add the bindings there

#

It's really worth looking at Epic's content examples btw

#

They cover all of this

pale grotto
#

Ok, I'll look into that

faint pasture
#

@pale grotto I put input events in the pawn and controller.

For a helicopter, I'd put everything that controls the helicopter in the pawn. I'd put pause and menu and other non-pawn input in the playercontroller

#

@pale grotto you can just as easily put all the input in the player controller though, and just have it call functions and events on its possessed pawn. That might work a little bit better if you intend to make pawns completely agnostic as to whether they are controlled by a player controller or AI controller

pale grotto
#

@pale grotto you can just as easily put all the input in the player controller though, and just have it call functions and events on its possessed pawn. That might work a little bit better if you intend to make pawns completely agnostic as to whether they are controlled by a player controller or AI controller
@faint pasture Yeah, this makes sense. I'll put it in the player controller then. Some helicopters can have different abilities, in a multiplayer games. So Adding it to PlayerController seems a good idea.

#

PlayerController can check what kind of helicopter pawn it has and assign inputs accordingly

faint pasture
#

@pale grotto Why not just implement the inputs differently in the different helicopters? That's sorta the point of having input on the pawns.

glacial eagle
#

that's exactly why the input should go in the helicopters 😄

pale grotto
#

I guess the kind of "Input Manager" I am thinking is the pawn itself.

earnest tangle
#

The fact that blueprint boolean nodes like AND and OR don't short circuit is mildly annoying

wraith verge
#

Hey! I'm working on checkpoints. Sry for such a broad question, but what would be a good approach to save/load the end-state of a sequencer to a persistant object, such as the game instance?

I've thought about "scrubbing through" the sequencer at begin play, but just assume there is a better solution to it.

worn nebula
#

What's the best way to make it so AI can't overlap with trigger boxs? I set up a custom collision object type for the AI but then they can't walk anywhere when I set it to them?

viscid cradle
#

Why is this missing?

winged sentinel
subtle pulsar
#

so ive created a sphere collision for when an enemy attacks that will be the point that collides with the player to register a hit. the problem is the sphere collider isnt showing in game

#

Nevermind just checked the hidden in game box

pulsar surge
#

hhahahah

#

ye olde hidden in game

subtle pulsar
#

my next problem is no matter what position i change it on enemy or any where else it shows on the stairs and not next to player

pulsar surge
#

ah

#

it needs to be attached to the enemy

#

one second

#

just launching up a project with this

subtle pulsar
#

Okay thank you

pulsar surge
#

single player or multi?

rough wing
#

@winged sentinel spring arm length?

subtle pulsar
#

Single player

pulsar surge
#

so you are using sphere collision for your enemy right?

subtle pulsar
#

Aye on the player base

#

Sorry enemy base

pulsar surge
#

may i suggest something different?

subtle pulsar
#

If you can show me how to do it pal, new to unreal. Only second day on it

pulsar surge
#

not right this second, but I can yes.

#

however

#

instead of doing it based on sphere collision do it based on a hitbox from the player

#

so if you open up your player

subtle pulsar
#

Thank you, the only reason I'm doing it this way is because I'm following a tutorial

pulsar surge
#

yeah there are a ton of different ways of doing everything

#

but if you do it this way

winged sentinel
#

@rough wing Ill take a look

pulsar surge
#

eseentially the logic is If the hitbox from the player collides with the sphere from the monster it will do your attack logic

#

you just put a hitbox infront of the player where their weapon swing is

#

and that hitbox activates animnotifystates

#

so during a certain point of the animation it activates that hitbox and allows collision

subtle pulsar
#

So what component do i need to add to my player bp

pulsar surge
#

its a bit more than that but yeah

#

one sec ill take a screenshit

#

shot lol

subtle pulsar
#

Thank you

pulsar surge
#

this is from Dev Addicts lesson on how to make a top down multiplayer RPG

subtle pulsar
#

would it be the same logic?

pulsar surge
#

no

#

one sec im just finding the logic for how this works

#

i highly

#

highllllllyyyyyy recomend this course

#

one of the first lessons is doing exactly what you need

#

thats where i built all that from and it works great

proud hull
#

@subtle pulsar How to do hit detection all depends on how accurate you need it to be. I can think of at least 5 ways to accomplish hits:

  1. Multiple single line traces from the weapon during an attack, 2) capsule/sphere/box trace around the weapon during an attack, 3) permanent collision capsule/sphere/box around the weapon and it is activated only during an attack triggered by an animation notify, 4) permanent "hit zone" in front of characters that gets a list of characters inside it during an attack triggered by an animation notify, 5) all attacks are simple attacks and they either hit or miss based on random rolls and current target.
pulsar surge
#

^^^

proud hull
#

#4 is currently being suggested

pulsar surge
#

Yeah exactly!

#

It really depends on what you need it for

#

if you are doing that top down style like your screentshot you don'

proud hull
#

I personally went with #2, but I need to know what bones are being hit.

pulsar surge
#

need to worry as much about the verticality of the models

#

number 2 is great and good for equipment swaps but takes a couple extra boney steps

cosmic portal
#

how can i lock the rotation of spring arm?

proud hull
pulsar surge
#

wiw

#

wow*

#

that is some sexy collision @proud hull

#

@cosmic portal you want to lock the rotation of a spring arm??

cosmic portal
#

yes

subtle pulsar
#

@proud hull that looks amazing pal how would I go about doing that?

pulsar surge
#

you would need a tutorial to run you through that

proud hull
#

I put a box collider around the part that can do damage, in the example it was the claw of the monster. Then I use a timer to do a multiboxtrace from the start position and the end position.

pulsar surge
#

oh thats smart

proud hull
#

I setup the timer on begin play and just pause it. Let anim notify determine when to unpause and pause again.

pulsar surge
#

ohhhhhhhhhhh

burnt sedge
#

Unreal tell me there is an infinity loop. But there isn't? My GPU Driver Crashes while the engine was open yesterday which crashes the Editor too and since that i get this problem. (its not crashing because of the engine, its crashed while watching a video). Maybe a bug?

If I spawn 30 and more NPC and everyone fires and hit each other and the player, it may spams to fast the events for the engine that it "thinks" there is a infinity loop?

The Performance is good enough for me, 8ms Gamethread with this unplayable amount of enemies.

pulsar surge
#

shit i may change over to that

subtle pulsar
proud hull
#

Good for performance and really accurate.

#

Lets me chop off bones procedurally.

subtle pulsar
#

at the minute i have this but the sphere isnt staying with the weapon

pulsar surge
#

yeah thats great. I have it set to a straight hitbox that turns on and off with animnotify

proud hull
#

Did you attach the sphere to the weapon?

pulsar surge
#

you need to attach

subtle pulsar
#

i moved it to the weapon

proud hull
#

Parent socket it is called in details.

#

Let me open my project and I'll get you all some screenshots of the trace system I'm using.

pulsar surge
#

click on the sphere

#

go to details on the right

#

if you cant find it search for parent

proud hull
pulsar surge
#

oh yeah thats looking slick man

subtle pulsar
#

i moved it to the weapon and now this happens

#

sort of goes around and stays there at the end

proud hull
#

When the weapon swings, does the sphere at least move? You may need to readjust its relative position.

pulsar surge
#

How many slots does the weapon have?

subtle pulsar
#

yeah it moves and just the one for the only attack

winged sentinel
#

is there anyway to lock an axis on a springarm?

proud hull
pulsar surge
#

I don’t use that type of collision so I’d have to play around first before I can answer much on it. And Salazar I think you can set it to absolute rotation to true

rose hazel
#

Is there a way for a blueprint to check if a mesh is attached to a socket

pulsar surge
#

Store a reference for the item

#

Check the reference

#

Set a Boolean when the items spawns (event play)

proud hull
#

@winged sentinel uncheck inherit roll in the spring arm. I believe that is what will prevent your camera from rocking.

rose hazel
#

Just dragged off from the mesh. Will GetAttachSocketName work?

pulsar surge
#

And then set a reference to that Boolean

#

Yeah but he will still need to get a ref for it no?

rose hazel
#

I’ll go with booleans if necessary, but I’d like to see other options first

pulsar surge
#

One sec there’s actually a forum post on this I’ll link it

rose hazel
#

Also, I have a reference to the mesh

#

It’s inside of the actor that’s checking for a socket

proud hull
#

GetAttachSocketName works. I use it to remove hit detection box colliders from limbs that have been chopped off.

#

Box collider is attached to the limb. So a simple comparison lets me know if that limb has a collider.

pulsar surge
#

Ah niceeee

rose hazel
#

I'm sure there's a much better way to do this, but is there any reason it won't work?

#

It needs to check if the lower receiver is attached to a socket in the stock

#

Aside from booleans that change when a part is attached or removed, this is the only way I can think of checking at the moment

proud hull
#

That should work. You can also skip converting the name to string and just run the equals test on the name itself.

rose hazel
#

Didn’t think of that. Good to know it can check the name as it is

proud hull
#

Some more to go with the hit trace logic. This is the montage that triggers it:

rose hazel
#

There won’t be any issues if there isn’t a socket, right?

proud hull
#

It will just return "None"

rose hazel
#

Great

subtle pulsar
#

my animation doesnt have that in the animation

rose hazel
#

When I used Roblox, doing something like this would cause it to scream at you since this would be the equivalent of getting a name from something that doesn’t exist

#

I wasn’t sure if Unreal automatically checked whether the socket existed

proud hull
#

I'm sure that function does check that, which it then determines it should return "None".

#

@subtle pulsar what is your animation missing?

#

The notify?

#

You have to manually add them to your animation montage.

#

I couldn't figure out how to give a single notify a beginning and end so I went with making 2 of them instead. Couldn't find any notify duration or anything.

#

Also never bothered to do further research on it, haha.

desert topaz
#

Im trying to make a copy of my cine camera settings when i push a button on a widget. does anyone have a good idea on how to start?

subtle pulsar
#

@proud hull that animation montage in that part In the animation

winged sentinel
#

@proud hull Ill try thanks

rose hazel
#

Somehow it did not occur to me that I don’t need an extra Bool when checking if one has to be changed every tick

#

Just check if it’s already been changed

#

This is why folks like myself should not be allowed in UE when only half a brain cell is awake

proud hull
#

After actually reading that myself, I now realized I should be using a notify state instead of a regular notify.

wraith wraith
#

Hey, i'm trying to add multiple same actor for the spotlight but i got a limit of light

#

What is the best way to add multiple same actor for a light ?
I need to do on bp to get access to all the same and modify them in game, like turn on/off.

#

this is the way i've done to get all the same actor of light, but yeah i need to find a way to not have this limit of light.

#

I was confuse at first why i've got an limit, and then i read that we only get a limit with the "Stationnary" mode.

Well i think i will just go change Stationnary to Movable.
"hoping it won't consume a lot in performance." 😆

sour vale
#

Looking for a good dash solution

#

like Celeste

#

3rd Person

raven pilot
#

Am not too sure how to explain this but I created a blend space, when idle is 0, walk anim is 400 and run anim is 1200

And i created a blueprint where you can only go at 400 speed unless shift is pressed then you can go to 1200 speed

that works pretty fine

but my problem is that when am at 400 speed the run animation plays, but the run animation is only suppose to play past 400 speed, when is 400 speed or below only the walk anim should play

So any help would be appreciated! thanks

zinc portal
#

Performance question about overlaps and traces.

I have a flying vehicle and I am creating collision warning system for it. I thought that I would use several collision volumes that would trigger when object get near. But my thinking about overlaps was flawed and it is not so simple to get it working with landscape and everything else.

How much of a performance hogs are traces. My second option is do sphere trace by channel. Plan is to put these in 8 corners shooting at random direction (basically a detection cone).

how big of a hit are 8-10 constantly running traces?

#

I think I will try it 🙂

pulsar surge
#

@raven pilot can you take a screenshot of the blendspace

faint pasture
#

@zinc portal pretty much zero

rose hazel
#

Is it possible to search for a Bool by name within another actor as long as there’s a reference to the actor itself? This will be for a modular gun, so I need a way to check for the Bool after the two actors have been attached since they’ll be separate at the start of the game

maiden wadi
#

You don't normally do that. Normally the actors just have a base class. Or worst case, you make an interface that returns your bool on those actors.

rose hazel
#

I’m sure there are better ways, but I just need to know if it’s possible for now

lucid cargo
#

I know this isn't really the right place to ask but since its still BP I guess someone might know. I already posted in in UMG and on another channel but nobody is answer (could be because nobody know) but here it goes I am trying to pass some parameters to the newly created widget but for some reason when I print out the value in the new widget the string its empty

#

The bottom image is the UI_ServerSlot widget

raven pilot
crystal kettle
#

Trying to rotate an actor 90deg on an event, I've created a curve between 0 and 1 and a timeline which uses this curve, on the event I'm lerping the curved timeline float value with a rotator but it's overshooting the 90deg a bit

midnight yoke
#

Hey guys! Anyone know anything about collision boxes? I am making a super simple demonstration for a school project but I am struggling with something. There are 3 things in my scene. My character, an actor, and an AI character. I need my character, but not the AI, to be able to overlap with the actor (to pick it up basically). So obviously I just turn off collisions on the AI right? Well I need my character to take damage when within a certain range of the AI. So I need a collision between the AI and my character. So in short how do I:
MyCharacter overlap actor and AI
AI overlap MyCharacter but not actor
Actor overlap MyCharacter but not AI

maiden wadi
#

@rose hazel You can't really 'search' for a variable in programming. That's why I said common class or interface. You have to get it from somewhere. The only other choice is to chain a bunch of casts til one succeeds.

pine trellis
#

does anyone know which one of these debugs I pack my game as? I just downloaded the debug symbols and it took a while

earnest tangle
#

DebugGame is the option with most debugging things enabled

#

I'm not entirely sure what the difference between that and Development is, but DebugGame is the one most likely to work with the debugging facilities. Shipping has all of it stripped out, and has the best performance

pulsar surge
#

your max speed is set to 1200

#

but you want max 600

#

isnt that what you said?

#

@raven pilot

#

also

#

I would do that in a blendspace 1d

raven pilot
#

@pulsar surge the max speed actually works pretty fine

the max speed is 400 by default, and when i press shift, it goes up to 1200, thats luckily works great

The problem is that when the speed is 400 or below its suppose to play only the walk animation

pulsar surge
#

oh nevermind read that wrong

#

you did want 1200

raven pilot
#

@pulsar surge the max speed actually works pretty fine

the max speed is 400 by default, and when i press shift, it goes up to 1200, thats luckily works great

The problem is that when the speed is 400 or below its suppose to play only the walk animation

pulsar surge
#

try it in a blendspace 1D instead

raven pilot
#

my message didnt send

pulsar surge
#

ohhh

#

have you tried running a check in the lofic

raven pilot
#

but in BS 1D is there direction? like left and right

pulsar surge
#

logic

#

no its not good for this scenario now that I understand what you're doing

raven pilot
#

oh, so i shouldnt use 1d?

#

i was watching a couple tutorials and i did everything they did and double checked and it worked fine for them

#

third person character BP

#

event graph

pulsar surge
#

is this just single player

#

I'm wondering if you need a validated get on there

raven pilot
#

yea this is just a single player, a single character

pulsar surge
#

put a print string at the end of that

#

on each one

#

have the target print out the walk speed

#

lets see if its actually getting the correct numbers first

#

they could be instantly being overridden somewhewre

#

where*

raven pilot
#

k

pulsar surge
#

thats the first step

#

because if it IS then its a different logic

raven pilot
pulsar surge
#

connect the green to the purp

raven pilot
#

k

pulsar surge
#

otherwise it will just say Hello

#

what ever is in the box or whatever it is referencing it will pop out

raven pilot
#

ohhh okay i see

pulsar surge
#

its one of your best debug tools to start with

#

that way you can see where your logic is going wrong

raven pilot
#

nice, never knew of it, good info

pulsar surge
#

throw a print string up after any logic you want to check to see if it gets there

#

i prefer it over breaks

raven pilot
#

nice

pine trellis
#

@earnest tangle thanks !

raven pilot
pulsar surge
#

exactly

#

so now when you run

#

it should show on screen your walk speed value

#

and when you release as well

raven pilot
#

kay

#

i will record it to show u

pulsar surge
#

oh you know what

#

I have an idea

raven pilot
#

ohh

pulsar surge
#

maybe

raven pilot
#

what is it

pulsar surge
#

it might work sometimes adding an additional check works

#

right after your set walk speed

#

create a new boolean called SprintOn

raven pilot
#

oh kay

pulsar surge
#

Set the boolean to true on the walk speed addition and false on the minus

#

at the begining of the logic check if that is true or false with a branch

#

on release check to see if sprint is on if it is set to off and continue your logic

#

if it isn't on you don't want it do anything

raven pilot
#

okay

pulsar surge
#

ALSO

#

wait

raven pilot
#

ohhh

pulsar surge
#

are your variables set to Reliable

zinc portal
#

@faint pasture thanks

pulsar surge
#

your character movement is being processed first

#

make sure those variables in there are set to relaible

#

you walk speed

#

ensure that bastard is reliable

raven pilot
#

lol

#

how do you set it to reliable

pulsar surge
#

click on the variable

#

go to the right details panel

#

little box will say replicated

#

make sure its checked

#

sorry not replicated

#

reliable

#

dont need it repliacted

#

try that first before adding the branchs. that may fix the issue

raven pilot
#

k

pulsar surge
#

one second and no thats replicated movement

raven pilot
#

ohh

#

i clicked the show advance arrow for more options

pulsar surge
#

okay lets try something else

#

i don't think that will actually work here

#

you are having a weird issue

#

it could be the system isn't getting the information correctly

raven pilot
#

hmmm

pulsar surge
#

theres one thing i see on these blueprints

#

often

#

is a validated get

#

try this

#

follow along with me

raven pilot
#

okay sensei

pulsar surge
#

this i think has the highest chance of fixing it

raven pilot
#

kay

pulsar surge
#

right after your button press

raven pilot
#

yes

pulsar surge
#

drag your character movement out as a get

#

right click on it and press convert to validated get

raven pilot
pulsar surge
#

perfect

#

now connect it before the set sprinting true

#

and connect the is valid

raven pilot
pulsar surge
#

before

#

we want it to do this first

#

from the target drag off and type self you want to get a ref to self here

#

I am hoping this fixes it, if not I think its an issue with the BS. That logic should work just the way you have it

raven pilot
pulsar surge
#

you dont want that is not valid connecting there

#

we are just doing the 1200 walk speed right now

#

we will do this again on the release

raven pilot
#

ok

pulsar surge
#

with the way you have it setup

#

if this was done with a custom even then yes thats how it would be done

raven pilot
#

k

pulsar surge
#

so on the validated get drag off from the target and get a ref to self

#

side note I was just reading into this and I think alot of people do this with functions

#

so once you have your ref to self

#

drag off the character movement into the setwalk speed target

raven pilot
pulsar surge
#

one second

raven pilot
#

k

pine trellis
#

I dont get it, I downloaded the debug symbols and packed the game in gamebug mode my game crashed but it gives me the same logs as before? where is all the good stuff the DEBUG GAME option is suppose to have?

pulsar surge
#

sorry senpai im just going along with you

#

you can actually delete the ref to self

#

i dont think we need it here

#

okay

#

so now

raven pilot
#

no problem dude

pulsar surge
#

if the is not valid

#

off*

#

throw another print spring in there and just type in the box something like Character Movement is in Valid

#

this will debug it right away for us and tell us if its coming back valid or not

#

if its not coming back valid right off the bat from the press then there is an initialization problem with the original values

raven pilot
#

k

pulsar surge
#

print string* lmao damn my bad keyboard skills

raven pilot
#

lol no wories

pulsar surge
#

change the print string to either in validor is not valid

#

it doesnt really matter we know what its doing but good not to confuse ourselves lol

#

then do a quick test

#

it shouldnt break anything and should tell you wether or not its valid

#

ohhh wait

raven pilot
#

so like change the name of the print string?

#

ohhh

pulsar surge
#

take off the set false for the sprinting

#

connect that back to the set walk speed 600

#

other ideas i was thinking is you may need to check the walk speed value

#

if this doesnt work we can hard code the walk speed

raven pilot
#

kay

pulsar surge
#

let me know what happens after test

raven pilot
#

k

pulsar surge
#

This won’t fix the issue yet

#

Or shouldn’t

#

It’s just a debug thing for now

#

Just to see where it’s screwing you

raven pilot
#

haha yea

#

by take off set false, you mean like click the check box fir sprinting?

pulsar surge
#

No you see how you have it connected to the validated get

#

The on release should just be normal for now

#

Not connected to the validated get

#

Just have it go right to the set sprinting false

raven pilot
pulsar surge
#

What we are essentially trying to figure out is: is the walk soeed being setup correctly and the blendspace isn’t doing the wrong thing or is the blendspace correct and the logic is wrong

#

Yes now connect the set sprint true to the validated get

raven pilot
#

oh i see

pulsar surge
#

And connect the set sprint false directly to the set walk speed 600

raven pilot
#

yes but the walk speed is 400

pulsar surge
#

I mean whatever you had the release logic doing before we added the get

#

Just have it do that

#

Release -> set sprint -> set walk speed

raven pilot
#

like this?

pulsar surge
#

Yep!

#

Now test and press shift

raven pilot
#

haha nice

#

k

pulsar surge
#

Does a message pop up in the upper left saying is not valid?

raven pilot
#

no in the midde

pulsar surge
#

But it says it?

#

Oh dude

#

Wowoooooowwwwww

raven pilot
pulsar surge
#

Wowoowowowowoow

#

I’m an idiot

#

Wow

#

You have current walk speed

pulsar surge
#

You also need to set max walk speed

#

Lmfao

raven pilot
#

lol

pulsar surge
#

All you’re doing is setting what they are currently walking at

#

Not what the max is

#

When it’s released and pressed you need to set the max not the current

#

Fuck lmfao

#

You need to ensure the max speed is being set and reset

#

Not the current

raven pilot
#

haha

#

how i do that

pulsar surge
#

how is that variable getting your speed?

#

fucking idiot

#

okay

#

me i mean

#

haha

raven pilot
#

lol

pulsar surge
#

im just getting you the command

raven pilot
#

dont be to hard on Evan

pulsar surge
#

no he needs the abuse

#

and enjoys it

raven pilot
#

fair enough

fallen wedge
#

🍉

raven pilot
#

you mean the sprint variable?

pulsar surge
#

ok i got it bro

#

i think i have this figured out

raven pilot
#

alrighty

pulsar surge
#

so

#

you are controlling max walk speed with a variable you created yes?

raven pilot
#

yes

pulsar surge
#

we can actually use blueprints for this

#

i think thats where you are getting fucked up

raven pilot
#

my max walk speed works

pulsar surge
#

how does the system know

proud hull
#

Also don't need a validated get since you know that component exists in the character.

pulsar surge
#

yeah i just realized that

#

its why i called myself an idiot a bunch of times

raven pilot
#

hmmm

proud hull
#

You need that input for both set nodes

pulsar surge
#

his issue is

#

that variable he created is not actually changing the walk speed

#

and he doesnt need it

proud hull
#

That is a variable within the character movement component, he didn't create it.

pulsar surge
#

if you get a character movement

raven pilot
#

so delete validated node?

pulsar surge
#

oh thats why i asked haha

proud hull
#

Oh that character movement one?

pulsar surge
#

yeah set it back the way you had

raven pilot
#

kk

pulsar surge
#

we can do this

#

with a character movement

#

and drag off it and set max walk speed

proud hull
#

I assumed that was the auto-generated variable of the character movement component.

pulsar surge
#

yeah i think its screwing it all up

#

i believe all he has to do is this

raven pilot
pulsar surge
#

or this one

#

get rid of those set sprinting

#

dont need them now

raven pilot
#

k

proud hull
#

Unless he uses them for animBP or something

pulsar surge
#

yeah ihad him add those

#

for now for simplicity

proud hull
#

Oh, hehe

raven pilot
pulsar surge
#

no

#

hahaha

#

just disconnect the character movement for now

#

we are using that for something else

#

lets go from the begining yeah?

#

delete it all

#

ill work with out

raven pilot
#

Oh, hehe
@proud hull oof yea, the speed values worked okay but the animation was working well, it was stuck at run animation

pulsar surge
#

yeah that means your max speed value isnt being set correctly

raven pilot
#

delete it all
@pulsar surge alright then

pulsar surge
#

delete it all

#

we will start from scratch

#

Now add that inputaction Sprint back in

raven pilot
#

haha ok

pulsar surge
#

no thats your set

#

right click type input action sprint

raven pilot
#

k

pulsar surge
#

you want that original node you had

raven pilot
#

so just a get?

pulsar surge
#

no

#

the input action

raven pilot
#

ohhh

#

got it

pulsar surge
#

ok from released

raven pilot
#

mhm

proud hull
pulsar surge
#

bahah yep

proud hull
#

Basically had it the whole time

raven pilot
#

hmm

#

i should try that? @pulsar surge

pulsar surge
#

yep it was basically what i was going to do

#

this is the most simple way you can do it

#

the only thing i would do is add a print string and connect the output of the sets to just make sure you are getting the right speed

raven pilot
#

k

pulsar surge
#

But the issue is @proud hull is that he basically already had this

#

his original picture is this basically

#

the only difference was he was setting the booleans

proud hull
#

He just forgot to hook up the 2nd set and was getting an error

gentle pulsar
#

Good afternoon! I may be trying to do the wrong thing (brand new to UE4) here however:

How does one access an asset from within a blueprint? I'm trying to figure out how to add buoyancy/swimming when underneath the new water system in 4.26. I have a "Water Waves" asset which has a wave source for the gerstner waves. I figure I can tie into this and do some logic within the character blueprint, but I can't for the life of me figure out how to tie in an asset reference so that both the WaterBody and the Character get the same wave generator source.

Edit: I've tried adding a variable to the FirstPersonBP, but can't find the right type

raven pilot
pulsar surge
#

that was whe we did the validates

#

the picture i showed was the original

proud hull
pulsar surge
#

and yes senpai thats correct

#

test it and see what it does and what values it orints out

#

if the values are 1200 and 400 the logic is correct

raven pilot
#

Good afternoon! I may be trying to do the wrong thing (brand new to UE4) here however:

How does one access an asset from within a blueprint? I'm trying to figure out how to add buoyancy/swimming when underneath the new water system in 4.26. I have a "Water Waves" asset which has a wave source for the gerstner waves. I figure I can tie into this and do some logic within the character blueprint, but I can't for the life of me figure out how to tie in an asset reference so that both the WaterBody and the Character get the same wave generator source.

Edit: I've tried adding a variable to the FirstPersonBP, but can't find the right type
@gentle pulsar is the water waves a particle system?

#

if the values are 1200 and 400 the logic is correct
@pulsar surge alright will do that now

whole mirage
#

@proud hull

#

quick question

gentle pulsar
#

It's a "WaterWavesAsset" I think

whole mirage
#

for the sprint

proud hull
#

@raven pilot so was the original problem that your blend space was getting stuck in sprint?

#

Run animation I mean

whole mirage
#

how do you get the set to green one to set with the blue targetr

gentle pulsar
whole mirage
#

@proud hull can you add me i have a question

raven pilot
#

@raven pilot so was the original problem that your blend space was getting stuck in sprint?
@proud hull yep

pulsar surge
#

how do you get the set to green one to set with the blue targetr
@whole mirage what do you mean

proud hull
raven pilot
whole mirage
#

okay ill try

pulsar surge
#

look at you go

proud hull
whole mirage
#

ill try thanks

pulsar surge
#

looks like its working?

proud hull
#

@raven pilot so it is your blend space that needs the values changed.

pulsar surge
#

ohhh i see

raven pilot
#

It's a "WaterWavesAsset" I think
@gentle pulsar did you watch a tutorial on it? my guess might be having like a socket for the effect to come from

and maybe like a condition for when to play like only when movement changes in water

pulsar surge
#

the animations are weird

whole mirage
#

thank you so much @proud hull

pulsar surge
#

yeah so like I was saying earlier Senpai if we do this and you get the correct values printed out

proud hull
#

@raven pilot your blend space isn't setup for the values of 400 and 1200

pulsar surge
#

^^

#

then its your Blendspace

proud hull
#

You can easily change it in your blend space

#

Max of 1200 and have 3 sections, each would be multiple of 400

#

0, 400, 800, 1200

raven pilot
#

@raven pilot your blend space isn't setup for the values of 400 and 1200
@proud hull heres my BS

proud hull
#

Actually that looks correct, hehe

#

Let's see your animbp

#

Where you set the values

#

from character movement

#

anim update event specifically

pulsar surge
#

should be something like this Senpai

raven pilot
#

oh okay

lime mason
#

hey can yall help me with something real quick? im trying to access a boolean from another blueprint and it doesnt like it

gentle pulsar
#

@gentle pulsar did you watch a tutorial on it? my guess might be having like a socket for the effect to come from

and maybe like a condition for when to play like only when movement changes in water
@raven pilot No tutorial as it I imagine the preview is too new.

The tutorial I did before trying out the new water system in 4.26 used a physics volume set to "water", however that'll just be a cube.

The water system has a socket for the Water Waves Asset Reference but I don't know how to add a similar socket to my blueprint

proud hull
#

@lime mason What does the error say?

lime mason
#

The property associated with Is Breaking Constraint could not be found in '/Game/ThirdPersonBP/Blueprints/ThirdPersonCharacter.ThirdPersonCharacter_C'

raven pilot
proud hull
#

vector squared

#

hehe

pulsar surge
#

why do you have vector length squared in there

proud hull
#

Change that to what @pulsar surge showed

pulsar surge
#

should that not be just vector length

grizzled rain
#

How many times per second is behavior tree being executed?

raven pilot
#

@raven pilot No tutorial as it I imagine the preview is too new.

The tutorial I did before trying out the new water system in 4.26 used a physics volume set to "water", however that'll just be a cube.

The water system has a socket for the Water Waves Asset Reference but I don't know how to add a similar socket to my blueprint
@gentle pulsar this is probable to advance for me but the asset is a particle? like what is it?

proud hull
#

@lime mason compile and save everything, close and reopen editor?

#

Common tech support "reboot?"

pulsar surge
#

@raven pilot change that vector squred to just a vector length

raven pilot
#

why do you have vector length squared in there
@pulsar surge hahaha thats what the youtubers devsquad showed me to do

proud hull
#

They are super fast, that's why

raven pilot
#

oh

proud hull
#

Yes, that should work now

pulsar surge
#

ayy there you go

raven pilot
#

kay lets find out

#

@pulsar surge @proud hull YOU GUYS ARE NOT GOING TO BELIEVE THIS. IT WORKED!

pulsar surge
#

WOOOOOOOOOOOOOOOOOOOOOOOOOOO

#

i would believe it because your math is all getting fucked up there lmao

lime mason
#

@proud hull why did that work restarting the editor

pulsar surge
#

because

#

its taking the information

#

and squaring it

#

oh

#

hhaha wrong question

proud hull
#

Yeah, 34.6 would equal 1200

lime mason
#

lol

raven pilot
#

lol

proud hull
#

@lime mason normal editor bugs, when all else fails, maybe a reboot works.

gentle pulsar
#

@raven pilot Not a particle system, it's ... a class? UWaterWavesAssetReference I think

pulsar surge
#

anyways

lime mason
#

lol

pulsar surge
#

glad it worked for you Senpai

#

wooooooooooo

#

gg @proud hull

raven pilot
#

glad it worked for you Senpai
@pulsar surge thanks men, i wonder why the tutorial told me to use vector squared tho

pulsar surge
#

Tbh we should have checked that first but that’s all part of the debug fun. Hopefully you learned a few things anyways

#

They are probably doing additional logic somewhere else

#

Or setting the values differently

raven pilot
#

@raven pilot Not a particle system, it's ... a class? UWaterWavesAssetReference I think
@gentle pulsar oh kay, do you think you can make the waves come from a socket?

pulsar surge
#

Senpai yes you can

#

You just attach them to a socket and it will follow the object

raven pilot
#

Tbh we should have checked that first but that’s all part of the debug fun. Hopefully you learned a few things anyways
@pulsar surge hahaha yea i learned a lot, am super new so it was a goo learning experience

pulsar surge
#

I do that for projectiles

raven pilot
#

oof yea thats what i was thinking

pulsar surge
#

And senpai feel free to add me and dm me anytime with questions

#

I’ve just opened up a game studio and I am doing a ton of learning and dev work right now so I always love a good debug practice

gentle pulsar
#

@raven pilot This is where my knowledge really runs out unfortunately. In theory in unity I'd add a variable/property to my class like UWaterWavesAssetReference WaterWavesReference; and then I'd be able to attach the asset. I have no clue what the equivalent in UE4 is, or if it's even possible with blueprint... maybe I have to do some c++ instead to make this work

raven pilot
#

I’ve just opened up a game studio and I am doing a ton of learning and dev work right now so I always love a good debug practice
@pulsar surge thats sounds really great, I hope your game studio becomes the next innersloth

pulsar surge
#

Hahaha thanks dude. Lots of work ahead but have a good team and some great concepts

raven pilot
#

@raven pilot This is where my knowledge really runs out unfortunately. In theory in unity I'd add a variable/property to my class like UWaterWavesAssetReference WaterWavesReference; and then I'd be able to attach the asset. I have no clue what the equivalent in UE4 is, or if it's even possible with blueprint... maybe I have to do some c++ instead to make this work
@gentle pulsar if you want the asset to play in water when you move, am pretty sure your gonna need c++ or blueprints

but in UE, from my very limited knowledge, an easy solution would be for the asset to come from a socket, making a socket is super simple

and then you can just program conditions or branches

pulsar surge
#

I’m always looking for freelance guys so get to work learning so I cna hire you

#

Lmao

raven pilot
#

Hahaha thanks dude. Lots of work ahead but have a good team and some great concepts
@pulsar surge sounds great, hopefully in about 2 years when i have a good foundation i can be some help

pulsar surge
#

Check out dev addicts senpai

#

Jeff has some $20 courses on teachable on dungeon crawlers, souls like, and FPS

#

They are amazing courses and after you finish even one you’ll feel super super confident. The guy does amazing work. In a month you’ll be able to start going hard if you put the time in with the courses

#

also has tons of youtube vids

raven pilot
#

haha i searched up dev addicts and i just got like mental disorders @pulsar surge

pulsar surge
#

lmao

#

one sec ill link you

raven pilot
#

They are amazing courses and after you finish even one you’ll feel super super confident. The guy does amazing work. In a month you’ll be able to start going hard if you put the time in with the courses
@pulsar surge i generally watch youtube videos, i did buy a course before a few years ago when i was younger and was super excited to first get into unreal

But would you say that courses are much better than youtube videos?

pulsar surge
#

yes

#

thats why you pay for them

#

I learned more in one course then i did with months of youtubing

#

and its constantly updated and improved

raven pilot
#

haha nice, i will probable have to try that, and 20$ is pretty nice

pulsar surge
#

for $20 you get an insannnnneeeeeee amount of knowledge

spark steppe
#

is there any way to spawn a mesh, or do i have to make an actor from it before i can spawn it in the world?

pulsar surge
#

add the static mesh component node

raven pilot
#

what has scared me about courses is that if I spend money on one, i get worried that the course might not teach me what i need and that i will need to buy another one but thats kinda just a weird fear, i assume its paid for a reason @pulsar surge

spark steppe
#

oh nvm, i have to select the mesh in the details i guess

raven pilot
#

but the rpg course looks like something that I would buy

spark steppe
#

hadnt noticed that before

#

thank you

pulsar surge
#

agreed senpai

#

however

#

i did the dungeon crawler course (thats what the screens i provided are for) and it covers litteraly everything

#

even texture and material editing

raven pilot
#

wow

#

that sounds promising

trim matrix
twilit heath
#

probably because you paired GameMode with GameStateBase or the other way around

#

either they both inherit from one with Base or neither one does

trim matrix
#

what do you mean paired

#

I'm using override for level

twilit heath
#

if your GameMode inherits from GameModeBase, your GameState has to inherit from GameStateBase

#

if your GameMode inherits from GameMode, your GameState has to inherit from GameState

#

your output log also screamed at you if you mismatched them

trim matrix
#

ah crap

#

my c++ class uses Base

twilit heath
#

i don't see any point in Base variations even existing

#

but at least all you need to do is delete the Base bit and fix the include

trim matrix
#

well i wanted to use the gamestate because it has multiplayer functionality

#

yah about to do taht

twilit heath
#

they work in pairs

#

GameModeBase with GameState or GameMode with GameStateBase can never start the match

#

which means BeginPlay on the World won't get called

trim matrix
#

i see i had so much confusion with this before

#

this clears things up

trim matrix
#

still not working

#

nvm

#

I forgot to change the derived class shit

solemn musk
#

Will this continueously update if I change the variable for the Game Mode?
This is in a Widget HUD

white crypt
#

put a print string and you will see

#

in general try to avoid umg binds

solemn musk
#

then whats an alternative for me to show text variables in my HUD?

white crypt
#

with events/functions

proud hull
#

@solemn musk if you change the game mode from Missions to another mode, then the cast fails and it doesn't return anything.

solemn musk
#

The Missions is a text Variable, the one being cast is a Game Mode

proud hull
#

Ah, nvm, I thought you were asking if you changed the actual game mode.

solemn musk
#

nah lmao

white crypt
#

try updating it only when needed

proud hull
#

Yeah, that should work. If you change the missions variable in the missions game mode, it will updated there.

white crypt
#

now it will run every frame (as long as the widget exists)

proud hull
#

Event driven is always best indeed

solemn musk
#

huh

proud hull
#

UMG bind events run every frame.

#

You could have the change only occur when the missions variable is updated.

#

Using a bind, even when it isn't updated, it will still re-set that text.

#

Majority of the time it has very little impact though.

#

If you have too many UI binds and tons of other events that must run on tick as well, then you may notice the impact.

solemn musk
#

So if my HUD has a couple components with the one Text thats needed to change, how do I update that text then from the event?

white crypt
#

make the event inside event graph of your widget

#

which will change the text for you textblock

#

and call that even

pulsar surge
#

So I was just talking to one of the instructors and to reference another variable from another actor you need to use an interface

#

I could not remember for the life of me what we did for that reference

solemn musk
#

Actually I think I have one similar thing of what im trying to do on a project I was messing around with last year

#

Just... gotta wait for it to download since its in a zip file on my Drive

proud hull
#

@solemn musk By HUD do you mean you are using the actual HUD class or do you simply mean you are displaying widgets?

solemn musk
#

Widgets

#

Actually I think its a Widget code, been awhile

proud hull
#

So the widget that would display your missions variable information, when it is created, you need to store a reference of it in the blueprint that updates the missions variable.

#

Looks like you are using game mode, so that can be accessed from basically anywhere.

solemn musk
#

My plan is to have the variable change depending on the map

#

So once the map loads, itll grab the variables from the Game Mode, and set them, then when the player spawns, itll show the Widget with the text set

proud hull
#

Make a widget reference variable in your game mode, and when the widget is created it fills that reference.

#

Then they can interact however you like.

#

Direct reference is always best. Then there are multiple other ways to get a reference after that.

solemn musk
#

yeah and then the widget will update the text with triggers thatll simply cast to the Game Mode originally and set from there

proud hull
#

In this case you will have the game mode do all the work. The widget will just display the info in game mode.

solemn musk
#

yeah

#

thats what I meant

#

lmao

#

sorry if im sounding too confusing

proud hull
#

Create widget, store reference of it in game mode, change missions variable in game mode and also use that reference to change widget text in game mode.

rough wing
#

How can I call GetActorOfClass from an object?

#

and not an actor

zealous sundial
#

Hello boys, simple ask : In Unreal FrontEnd, is there a way to have a better highlight of problematic value on the left filter panel ? To Avoid looking one by one, every filter :

#

Second one : Try to debug some hitch, i know it's not from Game Thread as on hitch, everything is on CPU Stall.

#

I think it's maybe come from i/o operation

#

just an ask about this : having every asset in one pak file can produce this effect ?

rough wing
#

@trim matrix that's not what I meant. I don't have access to gameplayStatics from an object

#

I want to have access to GameplayStatics on theaeketplace version blueprint

#

Marketplace*

lucid granite
#

why does that keep getting triggered

#

I set it when initializing and it keeps getting deleted every millisecond

proud hull
#

@lucid granite you are setting that reference to itself and it is not valid to begin with.

lucid granite
#

oh wow

#

thx bevis

rose hazel
#

I currently have a carbine that’s broken up into 5 actors, but can spawn with all of them attached via sockets. According to the world outliner, none of them are children of each other, but I can find out which meshes are attached to each socket. If I have a mesh in one actor connected to a socket in another, is it possible for the second actor to reference the first via the mesh that’s attached?

#

The way it’s currently set up, the stock has 3 booleans - SpawnReceiver, SpawnBarrel, and SpawnMag. The receiver has SpawnAction

proud hull
#

@lucid granite closer, but you can run that cast and set on is not valid.

lucid granite
#

bevis for buthead

proud hull
#

Haha. Looks perfect now.

lucid granite
rose hazel
#

@trim matrix here’s the action spawn within the receiver. The other parts work the same way within the stock’s blueprint

lucid granite
#

strange, it had to be set quite a few times before it stopped

rose hazel
#

When the game generates random loot, the bools will all be randomized. Weapons used by NPCs will always be set to true

proud hull
#

Tick hit a few times before it recognized the change. You can run that on begin play if it only needs to be set once anyways. Or add a do once node.

lucid granite
#

but it doesn't seem to work the first time

rose hazel
#

Will there be a way to make the actors children of the stock without all of the static meshes falling apart?

proud hull
#

@lucid granite maybe add a short delay between the add to viewport and the cast node. Something like 0.2 seconds.

#

Can also leave it on tick, it doesn't really hurt that it runs a few times before it finally grabs the reference.

rose hazel
#

here's what it looks like with the current system. The stock was the only actor out of the 5 placed in the world

lucid granite
rose hazel
#

This is the first working system I've made that stays together

lucid granite
#

I just tested it

#

the delay worked thx Bevis!!

proud hull
#

I think that is in begin play now and not on tick, so should be ok.

lucid granite
#

no

#

begin play only, no tick

#

I used the delay in the begin play idea

proud hull
#

You might even be able to lower the delay, most of the time 0.2 seconds is enough.

lucid granite
#

hmm

#

so why does the delay make it work and what is the way around using a delay?

#

but also not using a tick (I try and not use tick)

proud hull
#

You can put it on a looped timer that destroys itself once the reference is found.

#

It's a timing issue, so no perfect solution really.

lucid granite
#

testng

#

actually it didn't crash

#

or not crash, but the null-check issue didn't spike

#

I need to run that after I give the player-state to the widget

proud hull
#

It is safe to remove that isValid node as well. The cast will automatically do that check for you.

lucid granite
#

nice, that will make it shorter

#

that function fails in the widget so that is why I am passing it in via blueprint

#

I am thinking that maybe creating a C++ timer that loops until that function works may solve the issue.

proud hull
#

If you are using C++ use OnRep, if blueprint only, then you need some trickery.

lucid granite
#

what is OnRep?

#

on replicate, but not sure how it is used during initlization

#

actually I think I was told that widgets don't replicate

#

so I don't think I can use that here

proud hull
#

The problem is you are setting a reference to the player state, which is still null when that begin play is called.

lucid granite
#

I need my widget to send a message.
So maybe sending it to the Game-State then to the Player State (because it has RPC) then back to the widget now that the message is replicated.
I know I can get the Game-State easily in the widget so maybe that is the way to go.

solemn musk
#

I found the issue with my Widget not updating, I think because I had a startup animation so the text wouldnt change.

#

When the widget gets created it makes the text slide in for a neat affect

#

I had a test one without it and it seemed to work

#

wait nvm I mustve changed something on the actual widget cuz it seemed to work even with a slight animation

#

bRuh

lucid granite
#

so this worked, I set the player state ref to the widget object and then I called the function that binded the delagates

solemn musk
#

I managed to make it work, since I am using different Game Modes for my games actual modes, i had the detection use the other Game Modes widget instead of the one I wanna use

lucid granite
#

actually that fails without that delay

#

so having that short little delay makes all the difference.
I looks a little error prone to me though

winged sentinel
#

@proud hull would u know if there is a way to a thirdperson character camera to a bone, I’m trying to use camera animations from blender

proud hull
#

@winged sentinel Does your camera still have the same issue as in the latest video you posted? If so, you can set the camera lag in the spring arm.

#

You probably want it disabled for first person view.

fickle blaze
#

can someone tell me what I'm doing wrong

#

why is this not doing anything 😦

#

I called the function in event begin play but it never starts the tick or does anything

#

oh never mind I figured it out

#

just needed to do this

proud hull
#

That will cause the timed event to keep setting up new timers for itself.

#

Make a separate custom event to hook up to the timer and call that new event instead of the enemy in range tick event.

#

The timer will then do the trace once it is setup.

#

Or a do once after "then 1" in your sequence that is reset when the timer stops.

fickle blaze
#

uhhhhhhhhhhhhhh

#

okay I think I understand what you're saying

#

if you could show an example that would help a lot though

proud hull
#

@fickle blaze this is for hit detection?

fickle blaze
#

Ahhh that's nice

#

Thanks for the advice again

proud hull
#

In that example I setup the timer on begin play and then instantly pause it. Then the attack montage triggers the unpause and pause of the timer.

#

Using anim notifies, you can then narrow down the traces to only occur during the part of the animation that would do damage.

#

For instance, I didn't want the attack to hit when the monster raised their claw. Only when the claw was swung downward.

fickle blaze
#

ahhhh yeah that's a cool system

#

and i guess since it's so well made you could have a lot of them going

#

since they only tick when they need to

proud hull
#

I actually converted to notify state earlier too, hehe.

#

Didn't realize there were two types of notify.

#

Had a small problem where traces of other hit boxes were running even when they weren't animated and this solved it by cleverly setting the notify name to match the hit boxes being used in that particular animation.

solemn musk
#

So I made an enemy that wanders in the map, it works, cool, but does the NavMesh not function if using the Spawn Actor in the code?

#

It doesnt work for the actors who are spawned

proud hull
#

Are you spawning them outside the bounds of your nav mesh?

solemn musk
#

the placed actors function as normal

#

No, im just spawning them ontop

#

I even spawned in a test Actor and copied the location cords

ionic gull
#

How can a client tell a server owned object to run an event? In this case I need to update a containers struct inventory after someone closes it

solemn musk
#

I dont know if like the Actor is placed in the Editor it tells the actor that the NavMesh exists and spawning via code doesnt work that way or if I need an extra component to make sure it works

#

its just strange imo

dense mica
#

Can I somehow run breakpoints on second execute? I am really having difficulties with debugging.

#

😮

#

really good idea, i'll try that

#

thanks

#

i was incrementing integers instead of that but wasnt helping 😅

proud hull
#

@solemn musk Is the spawned actor being possessed by the AI controller?

solemn musk
#

yeah

#

I looked and found that SpawnAI from Class might work so im going to try that

#

Huh that seemed to work

faint pasture
#

@ionic gull You need to route through something the client connection owns, typically the PlayerController or Pawn. I'd Run On Server an event on the Pawn to notify the container to update.

ionic gull
#

@faint pasture Thank you! that will help a lot!

desert juniper
#

Or am I better off creating a new blueprint base class, and creating child blueprints that inherit from that base class?

clear temple
#

Is this for the items or what?

unreal fossil
#

hello, how do you guys pause the game but keep the keyboard and gamepad events flowing into widget screen?

clear temple
#

@desert juniper
If it is for items then use child blueprints and add things for different types of items then make children nod them and change stuff around on them

hollow drift
#

Hey guys i am bit brainstorming, perhaps you can throw me some ideas

#

i want to check if two pawns are on the same puzzle tile. What is the best way to approach it?
I have thought of two ways so far

#

one. I have a colbox on my tile, where i check the array lenght of the class type pawn

#

other one i do a colbox around pawn and check if it intersects with another pawn

spark steppe
#

are the actors aware on which tile they are?

hollow drift
#

goal is, when two pawns are on a tile, they placement gets shiftet, e.g. left and right, so they dont stand together at the same point

#

hmm

#

not realy

#

they get controlled by the player controller, which just checks if a tile is below the player

spark steppe
#

well then i would start to add that, when they move they could check on which tile they are and store that

#

then you can search in the tile size radius for other actors and ask them on which tile they are

hollow drift
#

and sets the player to middle of tile

spark steppe
#

or as you suggested make the tiles aware of it, if someone steps on them, store that, if someone leaves remove them from the list

hollow drift
#

i have that already

#

well, yet only the amount

#

yes good idea

#

but that should be then a good way to do it

#

make an array of pawns and check how many on tile. shift accordingly?

spark steppe
#

yea, so that the tile controls where the players should stand

hollow drift
#

i see

#

ty 🙂

spark steppe
#

anyone has a good suggestion on how to move a vector to a defined angle while keeping the distance to another vector? i have created that to set the location of my lookAt goal, but its a whole mess and doesn't really work for x/y, so i wonder if there's a sane solution which i couldn't come up with

#

specially the bottom right comment section is a math disaster... 😄

hollow drift
#

move a vector to an angle?

#

pawn/actor?

spark steppe
#

just a vector in relation to another vector

hollow drift
#

hmm

#

clamp?

maiden wadi
#

Are you trying to rotate one vector around another at a set distance?

spark steppe
#

i think my solution for the yaw (z-axis) is kinda okay

#

yes Authaer

#

but im struggling specially with the x/y thing as it's not one axis to rotate around

maiden wadi
#

It is. You're only rotating around Z

spark steppe
#

ok let me explain what it is for its the lookAt goal for my actor, so Z axis is to limit the yaw

#

but for the pitch it's relevant where the lookAt goal is on x/y axis

#

if i move it further away, the pitch will go down (less head pitch)

hollow drift
#

hmm

spark steppe
#

but i want to move it away while keeping the yaw

hollow drift
#

this is for a character look angle?

spark steppe
#

yes

hollow drift
#

so to speak you have a "box" where you can look around

#

the furtherst points

#

i have made something similliar previously

spark steppe
#

well, rather a field of view

hollow drift
#

to create a "facek" collision box

#

perhaps this might help as an idea

#

sec

#

i had a moving actor and a fixed actor

#

the fixed actor was my point from where i calculated for the moving actor where to go the furthest away

#

perhaps you can take a crosshair or something similliar as a fixed actor

spark steppe
#

clamping would work, but the results would differ to what i want

hollow drift
#

ok

maiden wadi
#

If you have two vector points, and one needs to rotate around the other at a set range and you're only doing this on X/Y, then all you need to do is get the unitdirection from the center vector to the one that moves. Rotate that new unitdirection around the Z axis, and then multiply the new unitdirection by the max distance.

spark steppe
#

thats for the yaw authaer

#

but i'm having trouble with the pitch

maiden wadi
#

The same math works for pitch. Pitch moves via X and Z. Just rotate it around Y

spark steppe
#

for yaw it's easy as you said as i can totally ignore the z axis and work with the x/y distance

#

wait let me rethink with what you said for a minute, my brain is melting xD

maiden wadi
#

Think about a ball rolling in place. If you spin it in place like a top, that's yaw. If you roll it in place forward or backwards, that's pitch. The same math applies, just different vectors and axis.

spark steppe
#

ah yea, thats how pitch actually works, but thats not my problem

#

i want to affect the pitch by moving the vector on the x/y axis away from the actor, that way the pitch also changes (unless you are on the same z-axis which for my solution is irrelevant)

#

the result actually affects pitch and roll

#

i move the lookAt goal away on x/y then i aim the head at the goal (that way i don't have to deal with the pitch/roll of the actual head)

#

but i think i have an idea now

#

as i know the Z angle and the pitch, i should be able to calculate the other parts

#

end of the day its all tris 😄

maiden wadi
#

If I'm understanding right, then all you would need to do for the pitch is find the rotator from the start to the new vector after moving on X/Y? Are you wanting it to affect the roll or avoid affecting the roll?

spark steppe
#

it should affect the roll, not the pitch. the problem im having is where to move it for that

#

without affecting the yaw either

#

that for the 2nd troublesome step which was in the bottom right of the screenshot

#

first i move the vector so that the yaw is fine for me, 2nd step is to get the pitch within range

#

by affecting the roll

#

no wait

#

no roll

#

ffs no roll at all 😄

#

that what all this should avoid actually

#

i dont want to end up with a tilted head, because thats what it would lead to if i let it solve by IK

maiden wadi
#

I'm just having trouble visualizing the end result. If I do understand correctly, it should be as easy as using a directional vector from the head location, to the target location, and converting it to a rotator. This negates any roll because directional vectors can't account for it.

spark steppe
#

yea i think you are right, what i need is the directional vector

#

i get it by just normalizing v1-v2?

#

i'm a bit stupid in vector maths and controlrig doesn't have all the foolproof nodes 😛

#

nvm, clamp length to 1 seems to do the trick

hollow drift
#

lol

#

🙂

#

i had kinda the same issue path, ending up using clamp to simplify everything

#

clamp good, clamp is stron clamp is claptrap

hollow drift
#

i am struggeling on the next step

#

i have spawwned several pawns. I want to put them into an array so i can exchange the models later on but keep the same functionallity across all pawns

#

issue is. i need to cast my pawn to the player controler. I do not understand how to get out of the cast an array

#

i dont want to make an array, i want to get the array and set it

#

any idea on how cast an array?

maiden wadi
#

@spark steppe Stepped away a minute. Let me double check, but I think the math on the unit direction is Normalize(TargetVector - StartVector)

hollow drift
#

or is that a bad idea to cast arrays?

maiden wadi
#

@hollow drift Can I ask why you're using a bunch of different pawns and not just swapping out a mesh?

hollow drift
#

i thought i could use the same script over again

#

but think make stuff just way to complicated..

maiden wadi
#

If you have a bunch of different looks for the same character type, and you want to keep that character's stats or whatever when switching looks, you're better off just swapping out a mesh. At least that's what I took from your question.

hollow drift
#

sorry i ment i use the same pawn

#

just an array of pawns

#

made with an for loop

#

i have several characters

#

but they share the same function. so i thouht i could do it over 1bp

#

Or leme rephrase it:
I want to spawn 3 pawns. Each sharing the same options but having different mesh. So far i just made a foor loop. The index of foor loop i will use to control who gets what mesh by making a variable and so on

#

issue is. i have bound my pawn to a custom player controler

#

in order to reference the object i did a cast to player controler

maiden wadi
#

Okay. But why do you need three different characters. Is it only for the look?

hollow drift
#

but it wont work if its just an object reference, i need array since several pawns are in the level so to speak

#

i need 3 characters, since the game requires 3

#

look doesnt matter for the moment. I have already a general idea how to do so

#

but what could i do instead of casting, to reference a non child object to player controler

#

or how to cast an array of objects

maiden wadi
#

Ah, okay. I misunderstood the first question. Generally if you want to cast an array of objects, you'd just for loop over the original array, cast and add that pointer to the new array of the casted type.

hollow drift
#

and get the value out of the cast and connect it with a get copy, where i can set which pawn i want to manipualte

#

ill use a get to specify which pawn has been selected

#

later on

#

but how do i get it first out of an cast

#

if i do a "make" array

#

i think i will have 012

#

then 000

#

then 000

#

since you cannot make an array out of an array?

maiden wadi
#

Okay. I'm going to back up a bit. What is your end goal? Why not keep an array of these when they're spawned? That array could be of the casted type, and then you wouldn't need to worry about it.

hollow drift
#

"That array could be of the casted type"?

#

what do you mean by that?

#

how do i do the connection between "as pirate pawn" and "selected pawn"

#

I am a bit confused hahaha

#

i want to keep the array

#

i need it during the whole game

#

if a player dies and so on

maiden wadi
#

What type is SelectedPawn?

hollow drift
#

actor array

#

since i spawn it as an actor

maiden wadi
#

Is this array only ever going to have PiratePawns in it?

hollow drift
#

yes

#

its just there to handle different stuff for all 3 pawns

maiden wadi
#

Then make it a PiratePawn type array instead of Actor type. Then when you spawn a PiratePawn, just add it directly to the array via AddUnique.

#

Then when you use the array later, you won't need to cast to piratepawn, since the pointers will already be piratepawn.