#blueprint
1 messages Β· Page 84 of 1
yeah
after all the module startup, the first thing that is game framework related is the game instance
for loading screen stuff
so if i were to use the "event init" in instance maybve it would load before ?
i recommend looking into CommonLoadingScreen plugin in Lyra
oh'
the moment you see the viewport, you should already have player controller though
Laura said just snatch it but I don't know how π
copy paste it to your plugin folder
Oh wow, that simple π
well yeah this is the problem obviously
the loadingscreen istself works fine i just need it to pop up faster idnno if thats possible:
when are you adding it now?
controller
begin play of controller?
hmm wait im acctualy doing it in my HUD
begin play of hud is also fine
aye its there but still to slow
standalone or?
probably need to add it while the map is already loading
that means, use the plugin π
I created a component and added it to my player and I'm seeing that components have 2 events "On Component Activated" and "On Component Deactivated". Are these events called when the component gets attached to the player or only when I add it to the player before runtime and it runs when it's starting runtime (being like "Begin Play" but for component) ?
Hey guys can you tell me if this is stupid or not please?
I'm trying to get rid of this:
they run before the component's begin play
you sure you looking at the right place? i dont see the Baby property
But do they run once I add that component to the player dynamically during runtime ?
Yea sorry it's a bit further down
Hi.
Iam Recreating The Blue Spheres Special Stage From Sonic 3 And Knuckles.
But In The Original Game When There Are Red Spheres In The Outer Formation (Red Spheres Forming a Square Of 9 Spheres Or More Can Work With Anything In The Middle Of The Square)
All Of The Spheres Turns Into Coins (Rings In The Original Game)
But I Can Not Find Anybody Done The Same In Any Tutorial
I Had The Idea To Make A Formation Of Blue Spheres In A Blueprint
And But Collision Boxes On The Outer Spheres Of The Formation
But I Want This To Be More Flexable In the Level Design Because The Original Game Had More Tha Only Square Formations And A Want To Put A Level Design Mode In The Game So That If AnyBody Made A Square Formation Of Individual Spheres It Will Function Like The Original Game
So Please If Any Body Can Help Me With My Problem
yeah?
on registering of the actor component to the actor, they will be called
assuming the actorcomponent has auto activate enabled
Thx
else you would need to activate it yourself
where is that ?
got it
thx
so that means if it has "Auto Activate" then it will call Begin Play, and if it doesn't have "Auto Activate" it won't call "Begin Play" until I activate it, right ?
Can you tell me if what I've done here says "If any of these are valid, then activate the skeleton, if any are not valid, then continue onto 'bind event to On Finished'
Is there a way to do this while falling in mid air? It seems to slow the character down temporarily when changing the gravity scale where as i'd like it to speed up from the current speed
its more like "For each BP_Niagara, if its valid, activate skeleton. Binds event anyhow"
If I were you, I would just make it so 'If blue sphere collisions are hit consecutively then turn all into rings'
The original game made it so that even if you hit 6 our of 9 but you had to miss one (meaning there's more than 1 second delay between hitting another sphere) then they don't turn into rings
So I'm basically telling it to activate the skeleton for whichever BP_niagara is valid, but bind the event regardless?
yes
Ok, I'm new to this still so trying my best to understand lol thank you
and Here is the red sphere spawner BP (and yes i made anothe BP to spawn the red sphere because i hade some problems)
and here is the red sphere
Did you read what I suggested above?
sorry but i did not get what you said iam still scratching the surface of this engine and it crashed just right now
I understand. So you're trying to get the rings to replace all the blue/red spheres if the player hits a number of spheres in the right order right?
yes if the player turns all the blue spheres in the outer perimeter of the formation
i will show some gameplay now please wait my pc is from 2024 B.C.
it crashed again
Ok, So in the original game, even if the player hits all the spheres on the outer perimeter but leaves the spheres, turns around and comes back to finish the rest they don't change into rings
so you need something like a timer or a delay per sphere overlap that resets the event which will turn them all into rings if the delay has change to finish, but if the player overlaps another one the event is reset
no if the player just turned the outer perimeter of the formantion into red spheres all of the spheres inside and outside blue and red turns into rings
yea I know that
but only if the player is running over them conitnuously
continuously*
of the player leaves the square and then returns, it doesn't change them to rings
try it yourself
no all of the square like in this gameplay turns into rings
Anyway to get them to all change into rings, you need to make the spheres on the outer perimeter have a tag, so you can call it for each time you overlap one. The inside ones wont have a tag, then you can say:
"For each one overlapped within 0.5 seconds since the last one, and 6 has been overlapped and turned red. Turn all spheres in this grid into rings"
Hello guys, im actually trying to do an area damage around the player. Its made from some explosions but I want to control exactly the distance from player each explosion will spawn. What would be the best approach to do it?
I was thinking to get forward vector and multiply by a distance, then rotate it around player. Actually I tried to use the node "rotate around axis" but it did not work, they just dissapear. If I dont use the node, they spawn in a line, like the following image. Any Idea how could I solve this problem? Or there is a better way to spread them around the player?
Code layout question: I have items that have loads of different actions that can occur (equip, equip to multiple slots, add to hotbar, etc etc). Right now I have actor components on the Pawn that read the items and perform whatever relevant process the item needs. For example I have a EquipmentManager component that just reads the equipped items manages changing and updating Skeletal Meshes. I was thinking about making the Item objects responsible for their own actions. I'm not sure if this is the best approach or not and I'm trying to decide how to proceed. Kinda just looking to see what other folks are doing
sorry for missunderstanding but you can actually leave the square if you turned some of the spheres in the outer perimeter into red spheres and come to it again and complete the rest in the outer perimeter and this function will also work
Really? I swear this never worked for me. Fair enough, if that's the case then this will make it easier for you
Just have the ones on the outer have a tag called "outerSphere" or something
how
And then just have a check that asks "if 6 with tag "outerSphere" have been turned blue then turn all objects in actor into rings instead"
maybe I'm wrong because there's a lot of ways to approach this
You can set tags like this
each component within an actor will have a component tag that you can create and name
otherwise the actor itself will just have a regular tag
note: every blue sphere is a different actor from the same blueprint (BlueSphereBP)
here is the gameplay from the engine (sorry iam noob at my own game) this is what i mean now i want when i do this all of the spheres turn into rings
@thorny forge But in my case the coins that were shown in the gameplay (BlueCoinsBP) instead of the rings
@thorny forge If you want my project to test it out yourself just let me know
Let me have a think
Destroying and spawning actors is quite expensive in this case, I'm trying to think of a better way
ok
I'm still thinking
thank you and iam waiting with bated breath
How can I make the player focus on something? For example, let's say a TV is playing, and it's playing something important. How do I make it so if they try to look away, the camera slowly looks at the TV again?
Set Control rotation
interpolate from current to Target , target being the TV
Okay thanks. Would it be better to disable movement or should the player still be able to move around, just focus on the TV?
Yeah true
Hi does someone know why the camera doesn't see the sky (i use "good sky" for my sky box)
Just testing
alright
Somehow "Begin Play" of the component on my BP_Character is getting called when I press play even if I have "Auto Activate" set to false, so I'm kinda confused π€
Nearly there man and I'll show you how it's set up
nice
@trim matrix Freebie
How can I create a category for actors? Or groups, or tags, or something?
For example, I have different weapon types: knives, guns, granades. Each has multiple actors in them for different weapons. How can I do a check inside of blueprint code that this actor is a grenade type, or this actor is a knife? I can't do this with a "class" check, because each individual is it's own bp class...
@trim matrix If you want to change the speed, just change the interp speed
Almost got it give me 1 sec
you got it
You should have a base class for the weapons
and make child for each weapon type
Enums I guess
Make a base class for the weapon, each weapon (guns, grenade, etc) is derived from that weapon classs.
if you have an array of Weapon ref, you can just cast to check the type
or do equal check with the class, depending what you need
hm. equals check doesn't return true if the parent class matches, as far as I've tried.
Got the first bit for you 1 sec
it will, how do you check it?
nier ost spotted
ok
best game to ever exist
Here, I made a child of a throwing knife, and recolored it. When I pick it up it checks if the class of the picked up object is equal to it's parent. And it returns false, sadly
Well cuz u are checking againts the parent
not the class it self
check your direct messages
But that's my point. I want to have something to check against, that will work for all the children. Or items in the group. Or whatever.
So if I have 10 different throwing knives, each as their own actor, I can have something to check that they are all of one type: throwing
You can cast it to the base class
though I don't have your project, I smell something wrong with how you structure your classes
but in any case
if u have an array of things, and u want to check if they derived from a weapon class
you can just cast the ref to the weapon base class
EG. BP_Weapon (Parent), child of it are (BP_Knife), BP_Grenade , BP_Sword
now there are an array
BP_Something, BP_Knife, BP_Sword
you can do a check with cast to see if they are derived from the weapon class
For Loop -> Cast the ref to a weapon class, if it's valid then it's a weapon class type
BP_Something will end up with cast failed while the rest will return succsess
No need to check for class here
get rid of get Class
Just get the blue pin -> Cast To Bp_Parent
especially if u need to access the instance. You better off casting the instance right away
Ok, that works too, thanks
does a variable need to be public in order for a child to be able to alter it?
either public or protected
but in bp there is only public and private anyway
hmm, I see
private will make the variable accessable to that class only, not even it's children
what about something like Initial Speed within ProjectileMovement component?
@white field what about it?
well that's like a variable within the component (not sure if that's technically correct way to describe it) and if the component is in the parent, say you wanted to alter it on children..
heh
hey guys I want to achieve a first person camera and I have a problem with my weapon actor that wont pitch automatically, so i have to set the rotation of camera from the player to the weapon actor (child component of the player)... but when i do this i can pitch BUT its stuttering when i do... any ideas? ... If u have any and ur done with your current thread, would be awesome π
ok thanks π
I have no idea why, but in AI_Character I can't spawn Sphere Trace By objects, line traces, etc.
someone can help
?
Show code
have u print string, make sure the sphere trace function gets called
Not sure how the top and bottom relates
but I never have a case where things don't work in package but works in editor
not saying that's not the case but I don't know what happend on your end
What u are saying is, u can't see the debug trace in packaged?
I would guess the debug draw mode is disabled on shipping but not 100% sure
sphere trace is not visible at all when I enter the Show collision command, but all others are visible
trace =/= collision π
ok
right
what can I do with this
how can I fix it?
where is issue?
late but I think you're looking for Is Child Of
Hello, anyone know, how to make this type of menu , how much vram is remaining ?
there is no issue it's working as intended. You need to actively tell the trace to draw debug for it to be visible
how? where?
is set For Duration
and not Draw in a packed game
in Editor all is fine
collision works in Editor with this trace
but not in packed game
yea it's not supposed to, it's a debug visualization
what you can do is project the world position of the start and end of the trace to the screen
and then use that to draw a line in HUD
Hey Guys! I Have the following Problem:
- When I set the transform of my WeaponActor to the position i get a weird stuttering only on pitch...It seems like it tries to set the location but steps back every tick and then it resets it...
Is there any different way to do this?
I Also tried to set a camera directly into the WeaponActor but then i cant pitch up and down...only left and right :/
does event construct on a user widget get called every time the widget is created after being removed or only the first time?
you can hover over it and read the tool tip
it can get called multiple times, under some circumstances
it also tells u what you need to use if u only need a one time thing that runs when created.
OnInitialized
I wasn't sure of the terminology here
well if u are not doing slate (c++) probably don't have to worry about it
ok thx
If I have a variable in a user widget, change it's value during gameplay, and then delete the user widget, will the variable still hold it's changed value if I create the widget again?
Lets talk about delete first
how do u define delete
remove from parent doesn't delete the instance of the widget
wrong word lol
Ok that doesn't delete the widget
So it's still hold the value (since the instance still exist)
and if u want to see the widget again, you can just add to viewport again
To delete widget, you need to remove from parent then set any reference to it to none. It will eventually get garbage collected
Yh I'm just trying to debug why a bool isn't working as I want it to so was just making sure that wasn't the problem
Willing to exchange pet pics for help π¦
Have an array to contain your items
add one everytime you pick something up
Bless, i had tried that using a "for each loop" but it kinda messed up the rest of my system - is there a better alternative/maybe i did not put it in the right spot?
You can't possibly have inventory system without array
unless ur character can only have one item at a time
Hello everyone, is anyone available to help with some issues regarding Delta Seconds math ? (I need help using the Event Tick for fake physics along a spline)
(hopefully this is the right channel)
I don't know what you use for each loop for
logic should be , on item picked up, Get the Item array -> Add the item to the array
oh, i just used it for its array
Delta second is the time it takes between last frame and current frame
Yes I do know that, but I am experiencing issues implementing it in my BP
probably best to figure out the math on paper then try to do it in unreal
if u need to set an object location, it seems like InterpTo is what you are looking for
my bpc inventory is already a string array, i attempted a validated get for it in between pick up and add - but uh... i'm only able to pick up one item in general now so i may have made a booboo
i think that is also my bpc inventory.. it all kinda goes back there - i believe. my knowledge in unreal is only 6 months in
update - made the valid get after my second branch go into its branch for both is valid and is not valid. so now i can pick up both! buuuut it still over writes
Guys I am having an issue. I have a box collision with this BP overlap and a custom InputAction called: Interact assigned to the E key. But it doesn't work. Anyone have any ideas?
Where is this bp?
What gets overwrite? show the actual variable
This is a door BP
oh, sorry - in game, if i pick up one item and then another my in game inventory will overwrite whatever was first picked up
That's the issue, your player doesn;t own the door. Any input called there will not work unless you set some setting which is a super terrible practice
Handle input in your player character
do the logic to interact there
facts
This is for opening a door
yes
don't do any input anywhere that is not owned by the player
you either do it in your character or your player controller
How do I do that then as each BP has different door settings
It's confusing at first, but you'll be CALLING the interaction from your player in the end for all interactive items
You normally want to use interface for interaction
here's a peak at mine for instance, it's in my player bp
You are creating a new widget everytime u picking an item
is this intended? because it's really fishy from my perspective
im just another newbie tho
no it definitely isn't intended
haha
I'd like just one widget
if it's valid then dont create the new widget, connect the pin straight to the add item logic
and here is TECHNICALLY my door. it's an interactive person, but the idealogy behing those two very different things (a person and a door) are essentially the same
like so?
oh wait
I need the BP in a datatable?
lmfao thank you xD
Got it workin', now just gotta fix my ui 'cause that is noooooot how my vertical box is spose to be working
?
I don't see how data table come into play for opening a door or interaction system
this is a data table
Interaction systems are widely covered in youtube pretty sure. A lot of them probably quiet bad but at least it's a start
think of it like that, your door is going to have an event that calls to make sure the interaction from your player is successful. If they agree with each other, your door will more or less use that interaction from your character - and THEN in your DOOR you'll have that whole "rotate" blah blah
Depending on your game, you want to define how to initiate the door.
Seeing that you are using volume, Im just gonna assumed you are doing Top down or some sort
- Player press Interact -> Get All overlapping actors
- For each Loop -> Get Actor -> Implements interact? if true, call the interact (interface) then break
https://www.youtube.com/watch?v=Bb8W3M5WBhs
If you're just starting to dip your toes - tutorials tutorials tutorials. It's annoying but lord it helps
π‘ Download The FREE GameDev Tools Here: π https://buvesa.com/free
βοΈ Free GameDev E-book
βοΈ Free Game Design Document
βοΈ Free Platformer Course (UE5)
β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬
π Join My Premium UE5 Course (The Unreal Vault) π
π Link: https://buvesa.com/course
πΈ Full GameDev proces
πΈ Level design
πΈ Boss Fights
β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬
π± ...
I hope you don't get stuck in tutorial for long, there will be time where you have to unlearn some stuff from youtube.
Matthew videos is pretty good imo
straight to what the node does
Aspland?
never watched him but the smart people shit on him a lot
hell yeah they do xD
Hey everyone! How do I add an actor tag via blueprint? Also does the Player StartTag count as an actor tag if I were to use "Get all actors with tag"?
how would i make my movement input dir rotate with the ground normal so the controls will adapt when running on walls and upside down so the camera doesn't have to follow behind
Something like this
https://youtube.com/clip/UgkxDO3Q3kBc3OmkMzFO6kolU1f60WtfeJW0?si=8Awu8g3eYt2QV88I
14 seconds Β· Clipped by maiko Β· Original video "I created Sonic Adventure... kind of" by chaomix
im currently using ninja character
Player Start Tag is a different tagging system as is the Gameplay Tags. For actor tags you can click the + symbol beside the trashcan in your screenshot.
I was just sending that to show the exact tags I meant. I am asking if there is a node in blueprint to add them dynamically
Thanks for the info about the start tag!
Tags is an array inside of actor. You can use add them using the Add Unique node with blueprints yes.
Okay I see that. Thank you so much!
is there any way to get UI button "on button down" event ?
U already have on pressed
how to make temporarily nodes inactive ? i do not want to compile them yet
@edgy ingotyeah but that only fires once i want it repeatedly fiering
i can do my own logic ofc im just checking if theres a done way already
Not that i am aware off
Yeah solved it
Wanna validate something with yall. So I am doing my dungeon crawler grid movement bp on a FP template project.
I got the rotation down, so I can turn the camera 90 deg or -90 deg at a time. The thing is, the WASD movement seems to only be taking me in one direction no matter my orientation, which I assume is normal since I haven't done anything with it.
Am I correct in assuming that to get to my goal, I have to base my movement on the yaw of my actor? So for example say I start the game, yaw is 0 (my camera faces the X axis) therefore my movement calculations should apply such that W and S set actor location on X and A and D set it on Y, but if I rotate 90 deg, then W and S should flip to Y axis and A and D to X axis?
Or is there a simpler way?
Does adding components to the hands in the VR template stop controller tracking because this suddenly happened to my project today even though I havent touched the VR pawn settings, only added a collision box
Hello, Iβm trying to make a movement system in UE5 where if I hold RMB and move the mouse, both the camera and my character's direction are affected, but if I hold the LMB, only the camera moves.
I enabled βShow Mouse Cursorβ in my player controller and used βSet Input Mode Game and UIβ inside my ThirdPersonGameMode to make it to where I had my mouse cursor showing unless I clicked, which would then hide the cursor and allow me to steer my camera and character, but the problem is that both the left and right mouse button do the same thing.
Here's a couple of examples. Left is how it's currently working, right is how I'd like it to work. Any help is appreciated
unless I'm misunderstanding you, you just want to enable "use controller rotation yaw" while RMB is held down
yup
mouse always changes control rotation
camera always follows control rotation
when rmb is down, character does too, otherwise it follows velocity
hmmmm I think I moved a bit further in my quest.. So I think I figured out that I can use "forward" vector to dictate movement based on camera rotation.. however I am still not there
Can't quite grok how that plays into the movement calcs
Describe your desired rules
you want character orientation to be xxxxxxxxxx when xxxxxxx and yyyyyyyyy when yyyyyyyyyyy
Are you asking me or Occams?
whoops wrong guy
You want to store either just the yaw value or a rotation
then rotate your inputs by that rotation to convert from WASD space to world space
well I have rotation stored as a variable every time I rotate.
But I have no godly clue how to translate it
lemme post a pic of the current tragedy
rotate vector
make a vector out of your inputs
rotate it by the stored rotation (or by the camera rotation, which is typical for a game with camera able to be at any rotation)
bam, thats your inputs in world space
if you want to turn by 90 degrees to the right you just get your control rotation, then get its right vector and make that your new control rotation
interpolate to make it smooth
I got the rotation down just fine already
Break that up
im trying to make WASD work based on the rotation now
OK first off, what inputs do you have
do you have WASD as a vector?
or do you have MoveForward and MoveRight as separate axes
you add movement input, for W and S you get the forward vector, for A and D you get right vector
ok so you have a vector
So as of now, whenever I hold either the left or right mouse button, my character turns to follow the direction my camera is facing, but only while moving. This is only intended for the RMB. If I hold either button and rotate the camera without moving, the character stands still, which is intended for both. Currently, Use Controller Rotation Yaw is unchecked
@turbid pecanPrint that, make sure it seems correct
X should go 1 to -1 on W and S, Y should do the same on A and D
On W press
I wonder if my EIA keys are set up with the right modifiers
are you trying to avoid using the character movement component?
even if so you should probably copy that setup for movement
add movement input will move the actor each frame and scale it by the deltatime
im just using the FP template and I went into the event graph where it had the look and move stuff, and just disabled those and added my own mess
The thing is my movement needs to be precise, 300 units on any axis and only if theres nothing in the way on that axis
Clamp
I kinda feel like we are talking about slightly diff things now
Atm the only issue I have is that my WASD is not respecting the camera look
They sure aren't
So say I am looking at the positive side of the X axis, I would like W to add 300 to x and S to subtract 300 from x
but if i turn 90 deg right, then it would be +300 - 300 on the Y axis by pressing W/S
Yeah I had a suspicion. I don't really know how to do this yet... I dont even know what swizzle does.. Sadly
I just fudged it
Get WASD to output
W = 1,0,0
A = 0,-1,0
S = -1,0,0
D = 0,1,0
Swizzle moves from X to Y and from Y to Z etc
so w = nothing
A = negate swizzle
S = negate
D = swizzle
Once you get your inputs straightened out, then worry about the translation to world space
ok done
Correct nums showing
So first off, thanks for helping here
k so set up your movement to totally ignore camera for now, just moves in world coords based on input
Input -> ??? -> Move in X direction
Rather
Input -> MoveDirection = InputVector -> do the move
Then once that's working, you can get MoveDirection to adapt based on camera
Hey all. I'm having difficulty getting animation notifies to work. Inside my Animation Sequence called punch I added a skeleton notify called PunchEnd.
In my Animation BP I am able to right click and add the event. When the punch is triggered, the animation plays but the notify is never called. The punch animation is called from a state machine if that makes a difference.
Any thoughts on why the notify is never triggered in the AnimBP?
CameraRotation -> break -> yaw -> divide by 90 -> round -> multiply by 90 -> make rot -> this is now your rotation you care about
MoveDirection = RotateVector(RawInputVector, RotationYouCareAbout)
done
Assuming you already don't have a snapped yaw angle, if you do you can skip all that and just use it.
OK so this moves properly atm when I start the game. I am facing +X and W moves me fwd, S moves back and so on:
set an intermediate MoveDirection variable
between the input vector and the do once
So as of now, whenever I hold either the left or right mouse button, my character turns to follow the direction my camera is facing, but only while moving. This is only intended for the RMB.
probably because Orient Rotation to Movement or Use Controller Desired Rotation is enabled in the movement component (probably the latter)
If I hold either button and rotate the camera without moving, the character stands still, which is intended for both. Currently, Use Controller Rotation Yaw is unchecked
if you don't want Use Controller Rotation Yaw to affect your character when it's not moving you just check if the velocity is bigger than zero while the RMB is held down and if not you turn it off
Like so?
@faint pasture the rotation code I have is this:
It both sets the control rot by 90 or -90 based on Q or E press and also stores it for other uses
You should have a TargetYaw float variable and use that
The reason you'd want to do that is for precision
what if you move AS the camera is rotating
you'd move off the grid
So set a TargetYaw float there, which is only ever some multiple of 90, then you can use it in the movement side of things
just after the do once:
TargetYaw = TargetYaw + InputValue * 90
then use that in the movement code.
MovementDirection = RotateVector(RawInput, MakeRotation(TargetYaw,0,0))
I currently have Orient Rotation to Movement checked and Use Controller Desired Rotation unchecked. Whenever I uncheck Orient Rotation to Movement my character no longer turns to face the cameras direction, but still moves in that direction. I'm posting a picture of my IMC and Blueprints to see if that helps clear anything up.
if you don't want Use Controller Rotation Yaw to affect your character when it's not moving you just check if the velocity is bigger than zero while the RMB is held down and if not you turn it off
I unfortunately don't understand this. I'm brand new to basically everything.
Only real change I've made is to my Game Mode, where I added the control for hiding and revealing the mouse cursor
yes, because you're driving your movement direction by Control Rotation
what do you WANT to drive your movement direction by?
can you give a very simplistic point by point summary of the behaviour you want?
Probably wants to use the capsule rotation instead of control rotation for determining the movement orientation
that's really the only other possibility
While holding the LMB, I want WASD to control to direction of the player, while mouse controls the camera to swing freely around the player without affecting movement
that has nothign to do with movement like you were just talking about
or rather
direction of player and direction of movement are separate right now
do you want WASD to ALWAYS input movement relateive to the pawn's rotation?
Has anyone dealt with crosshairs for third person games?
My character is offset from middle, and I'm using a projectile that comes from a point on the mesh, out towards the direction the camera is looking.
When I try to adjust the crosshair position, it is always off in some way. Either it lines up perfectly when hitting something up close, but then it is off when hitting something far away, or vice-versa.
If I do a line trace from the fire point in the direction and then ProjectWorldLocationToWidgetPosition from the impact point, it works, but the crosshair also jumps around wildly.
I don't think I've ever played a 3rd person game where the crossthhair didn't align with where e projectile/shot would go, and it never really jumped around wildly.
Video of issue:
https://gyazo.com/5e460054797e8f636c38a13a4ac7482a
Attached is my blueprint for my projectile transforms, I've tried a variety of values for how far out from the camera to "aim", 50, 5000, doesn't seem to make a huge difference.
I'm wondering if I need to line trace to that point on the screen, and then use the impact point there as the target in my find look at rotation?
Just use the capsule's rotation instead of control rotation in your movement input logic
That's a fundamental problem with 3rd person games
so while LMB is down you want to Orient Rotation to Movement, and not use controller rotation yaw
Do a line trace, and enforce some minimum and maximum aim distance you care about
You still want the mouse to move the camera at all times
ok apologies if im being dense here...
- Create a new variable called TargetYaw
- Set it to something like 90?
- On rotate input add "action value" * 90 to it?
- Store the result as new TargetYaw?
just control rotation does/doesn't drive capsule rotation
Have TargetYaw ALWAYS represent the yaw the camera wants to have.
Use it as the yaw for movement transformation
RotateCamera -> update TargetYaw -> do the rotation
Movement -> rotate InputVector by TargetYaw -> do the movement
That way if you move halfway during a camera rotation you don't walk off the grid lol
you do want to move on a grid right?
You can avoid the DoOnce nodes by not using Triggered and using Started instead
it'll fire once per key down
I'm way too tired to be giving programming advice haha
No I get that, I was just wondering what was wrong with the way I am doing rotation atm. Like the input from Q and E is either 1 or -1, which when multiplied by 90 becomes -90 or 90, but just a float. It's never different. The character rotation I get there always starts at 0. Because this is the default orientation.
To be clear - I am asking all these questions because I am also learning here. Not just doing stuff. I kinda wanna understand what I am doing and why
@faint pasture thank you. I think I was making it more complicated then it needed to be... doing a line trace from the fire point to a point along the forward vector of the camera does seem to fix the issue, and it properly hits the crosshair point both near and far. I swear I did this before and it didn't line up, but so far so good
if they want to make holding a directional key down move repeatedly in that direction then I honestly am not sure how you could make this setup any better
even though I really don't like it
So this is what I was able to setup, not sure if it's correct, but it's has basically reversed the problem. Now, neither mouse button will control the characters direction.
So if the RMB was working correctly before, the LMB is working correctly now
I always want W and S to move forward and backward, and A and D to strafe left and right. While moving forward holding W, I'd like to be able to steer by holding the RMB. Alternatively, I'd like to be able to look around without affecting my characters direction while holding LMB. Does that clear anything up?
you want strafing movement that is not perpendicular to the camera direction?
I'm a little confused
That is correct
okay
So if I'm looking over my characters left shoulder, and I strafe, it'll will be directly left and right relative to the character, not the direction of the camera
move and strafe relative to WHAT
so relative to character
so do what I've said to do 3x already
use capsule rotation for your movement vector, not control rotation
then just hook rmb up to enable/disable using control rotation yaw and it'll work
I posted a pic where I tried that above, but I'm having the opposite issue. Not sure if I did it right though
that should work, now to get the control rotation and capsule orientation thing hooked up right
Hey does anyone know why my initialise function is working for the server host (listen server) but not for a joining player? I dont understand why the cast is returning an "Unknown" player character.
your 2 states are that you either use control rotation yaw or not. You never orient to movement as far as I can tell.
get player controller 0 is gross
how do i do it correctly lol
what class is this code in?
its in a player hud widget
should it be in the player controller?
either that or gamemode
something that exists on the server and is network aware, the widget is neither
?
no
just enable/disable using control rotation for the pawn's orientation
that's it
right
movement is always relative to pawn orientation
Camera always follows control rotation
Mouse always changes control rotation.
When RMB is down, pawn orientation follows control rotation
when it's not, it just stays at whatever rotation it was last at
you're after WoW style controls right?
what would be the difference between the gamemode and the player controller, if I were to initialize it on one of them
gamemode exists on server only and is already the thing creating the pawn to begin with
so while it's doing that, it might as well initialize it too
so the player controller is essentially instantiated for each connecting player and doesn't exist only on the server?
no it does exist on server
refer to the diagram
Would anyone know why my decal reflects white when there is no light and shines white. It is a blood decal. How can I stop the reflection of lights or reduce it?
ty
show material
@faint pasture last bit of pestering if I may.. This set up for movement right here works beautifully. Although it is not conducive to quick succession movement. Like Clicking W repeatedly will still be the same animation speed and the timeline doesnt do much to speed it up and I suspect this is to do with the do once node?
I tried without it, but this ends up with pretty big drop in collision accuracy and i sometimes phase into walls
So this happens in my gamemode when a player joins, how can I get a reference to the widget reference (UI Inventory Ref) from the HUD widget?
why you got emissive color?
You'd probably want a queue of moves and a timeline that goes through them
or just speed the timeline up
Either way, if you want to avoid the problem if clipping through corners you have to have something that makes the intermediate moves
Thanks, removing emissive worked π
I see. Okay Iβll dick around with it some more tomorrow. Youβve been a big help. Iβm really grateful for your help.
You probably want emissive in your material for glowing liquids but yes, blood usually doesn't glow
if it is glowing, you've had a REALLY bad day
3.5 roentgen - not great, not terrible
That is exactly it, and I tried to figure out what you mentioned regarding using RMB to enable/disable using control rotation yaw, but I don't think I'm doing it right. My assumption was that I'd call the RMB event and store it as a variable, and then turn Control Rotation Yaw on or off based on that, but that's not working. Once again, I'm very new, so I apologize for my ignorance if this is done completely wrong
You can just directly set use controller rotation yaw or just directly get the input action value
you have a lot of extra steps
So like this?
put a print on those and make sure it's responding to clicks the way you want it to
Can anybody help me solve this issue? I am trying to create a drag and drop but it only works when the (Generic button) is disabled and not when enabled. Any more information needed please let me know
So it responds to my clicks as expected while stationary, but not while moving, which coincides with my current issue
why would moving change that?
you sure you don't have orient rotation to movement turned on?
Can anyone help with this?
Why does the gamemode care about widgets at all?
are you storing game state in your widgets?
If what you're after is a way for the widget to know that the inventory is initialized, use a repnotify probably
No, i just want to open the inventory when a player presses tab. My issue is that I cant get the player controller in the widget blueprint (using get player controller index 0) to return a correct player pawn for a joining player. Works on the host, not anyone who joins.
but either way the gamemode doesn't care about your UI at all, it just does its thing. Whatever is storing your inventory data is responsible for letting the UI know it's been updated (or better yet, the UI just binds to a dispatcher on it)
delete every get player controller 0 in your project
for real
Start from the top, what class is spawning your widgets?
usually it's PlayerController or HUD
I'm not sure, and it is not. Whenever I'm moving, the print string doesn't appear, and whatever state it was in before the character starts moving is what it gets stuck in until I stop moving. So if I hold the RMB and then start moving, then Controller Rotation Yaw is enabled, but if I don't, then it's the normal controls
lets say HUD
which is it actually?
Here's my current blueprints if it's any help
that looks fine
player controller
so the widget shouldn't have to look very far to find the playercontroller it cares about, it's held by it
Get Owning Player
thats it, thats the playercontroller which owns the widget
what is your tick doing right now
I am trying to follow a simple tutorial and im only about a minute in and this i not working for me
show more
but a behavior tree component and a behavior tree are not the same thing
Nothing, it's currently not being used
try:
Tick -> UseControlRotationYaw = IA_RMB
you can just get input axis values whenever you want
you don't need the input axis event
I have done this before and it worked but am redoing it cause of other issues that happend this is the working one and I can't figure out why
Good to know, thank you
is BaseSecondEnemy a subclass of BaseEnemy?
it's a new one
your object types for BehaviorTree variable are different
one is a component, one is not
why is it not a subclass though
I must be blind
it's not a subclass because I am remaking it to fix another issue to see if I missed anything
Any idea why this still returns "Unknown" for the cast?
Don't rely on the debugger
when are you calling this?
your pawn might not exist yet
here in player controller
event begin play*
that might be too early
also you want to gate by LocallyControlled, you don't want to try set up UI for the serverside playercontroller
yeah that's way too early
you just told the server to spawn you a pawn, and now you want to get at it
the server hasn't even got your request yet
welcome to multiplayer
yeah that looks fine
when should i call it then
the controller requesting a pawn is a bit sus
When the pawn is there and possession has already happened
do you hvae access to AcknowledgePossession in BP?
I have event on possess?
I figured out what was wrong. I had implemented the ability to move forward by holding both the left and right mouse buttons simultaneously, and that was getting in the way of your solution. Got rid of that and everything is working as intended, I just need to figure out how to add that functionality back without breaking the camera now
Thank you so much for you help, it's really appreciated
Doing this works fine in singleplayer and for the server host, cant even open the inventory on a client
these are the errors
referring to this initialize function, which has an is valid inside:
Is it poossible to get a random number between 0.0 and 1.0 to replace the 0.2 value? So this will be random everytime
Blueprint Runtime Error: "Accessed None trying to read property CharacterMovement". Node: Branch Graph: Handle Enemy State and Calculate Degrees Function: Execute Ubergraph BP Base Enemy Blueprint: BP_BaseEnemy
I keep getting this error yet if I copy and paste my enemy in it functions fine but making a duplicate or child does not work, am I missing something? the rest of the code is just making the 8 way sprites trigger and rotate correctly
because OnPossess isn't AcknowledgePossession
every what time?
every frame?
every instance?
Just randomly in seconds
So when I dragf ther light out they don't all flicker at the same time
It doesn't let me add it on the material though
Does anyone have good tips for optimizing nested arrays?
In my case I need to iterate through a bunch of actors, check an array of their values, and compare it against another array of values.
I'm not really sure how to optimize this well, since I need to recalculate my values knowing that many of them have changed. So I can't really cache them to save calculations (besides storing the result until next calc like I already do), and if I update as values change then I basically need to calculate the same thing in reverse.
I dont fully understand... working with arrays in parallel is not ideal?
that is the issue, I'm not sure how to avoid the arrays
Well there are structs.....
Data tables....
Like i said, i dont fully understand.. so i can only think of the other data types that can be utilized
anyone know why this returns "No Player Controller" for connecting players but not for the host?
OnPosses only run in server
Dont add delay its not even a bandage, u dont know how many second u have to wait since that depend on ping
I can try to clarify more.
I am running calculations that need to compare multiple arrays from multiple actors a couple of which are maps of arrays, which naturally requires lots of nested loops.
So like Actor>Map of arrays>Array compare against Array and do it for everything in the map
I'm trying to figure out how to optimize that process a bit more because obviously my operations will grow exponentially.
Convert the 0.2 to parametre. Then you can dynamically set the value in bp using set scalar valhe node. look for infos on dynamic material instance
Heard looping thru array is slow in blueprint, if your calculating a lot of stuff then you are already hitting the wall in bp.
It really depends on the size of the array. A few hundreds probably wont matter imo
If you want speed then do it in cpp
Ah I was afraid of that
I'm not very comfortable with cpp and vs sucks for performance
vs2022 doesnt suck tbh π
This is going to fire for every user. Either add the input mapping in the player controllers begin play instead or use is locally controlled -> true before the cast
Thanks yeah this makes more sense
Hey yall I was wondering if anyone had run into this before, basically I am using a waterfall fx blueprint to simulate the wake coming out the back of this ship. Its just a mesh along a spline, however the meshes keep despawning depending on where I look. I don't have World Partition enabled or mesh streaming or anything. I am not sure why this is happening.
Just a guess but it might be an issue with your meshes object bounds since it seems to be related to your cameras transform. It could either be in a weird spot/too small. You should be able to increase the bounds scale somewhere
Oh yes! I think that did it! Thank you π
Is there a way to get a variable from the level blueprint from an actor?
I see getLevel as a node, but from that I can't get any of the level blueprint variables.
Nm, gamestate makes more sense to hold these variables
You cant in bp. Dont use level bp for gameplay stuff
Maybe it's time to finally learn then
I've just never experienced good performance from vs, nor have i seen it markup UE cpp properly
back then in vs2019 yeah it sucked
I'm tryna create a data asset with the information I'm setting through the utility widget
but I don't know how to give it a variable when it is created
the data asset is succesfully created yeah, but it comes up empty right now
Hello! I'm trying to figure out how I can make a global leaderboard for the 10 top scores. Do I need to do it manually every update, or can I connect to a database where I can send (or even put manually) and retrieve scores?
Your call?
Can just retreieve the data when you open the widget or refresh it as often as you like depending on your need
open widget, asynchronously retrieve
usually
if you want immediate then maybe a periodic background query, then whenever widget shows up, refresh to latest local copy
yeah I figured that out, but how do I retrieve the information?
Where do you want to store the data base?
And how
I dont know... anywhere
any reccomendations ig?
I dont tap into this sort of thing but if u have a website u can prob use mysql
Or you can have it in a txt file somewhere on the net 
I can only give crappy ideas
I found a tutorial for mysql
its alr lol
U will still need a server tho
There is already plugin for leaderboard afaik
If i have to do something like this, i would just use api and make http request
anyone know a fix to a problem when I create blueprint and all added default data disappear when I save the bp?
I want to create a character bluprint that I can place as often as I want. If you left click on it the camera should switch to the new character (works). However, you cannot control the camera but continue to control the one of the first character. All characters have the same BP
Use Possess
whats that?
ok i still cant figure this out i dont understand, why does this print string return null for joining players but not for the host of the session? this snippet is run on event begin play, if I run it on event possess its null always, idk surely I am missing smth obvious?
If I remember correctly, possession isn't completed until the following tick so could be related. If you add a delay until next tick does it still return null?
You need to tell the controller to possess the new pawn/character otherwise it won't receive inputs from the controller.
All you're doing is changing the camera it uses to view the world from.
Can I export blueprints in some more functional way that just screenshotting them? I would like to make myself a catalogue that can ideally be rendered somehow in Obsidian. Thank You.
It's hard to say without knowing more about what the end goal is. Saying you need to compare arrays isn't much to go on.
Depending on the values/data you're comparing, sometimes using 'sets' can be more efficient. Especially if you just need to know if a set contains a list of values and similar operations.
What's obsidian?
SOrry, note taking app, it can do markdown, bit like oneNote, Notion, etc.
have you tried disconnecting the connection from the add input and the float variable output and connect back?
hmm
On posses only run on server machine
If you need to run something on client machine use acknowledge possession
Dont know anything about the software you use but there is blueprint paste bin which can be embeeded afaik. Never used it my self
Doesnt work unfortunately but delaying it by 1.5 seconds does
im testing at like 500ping so 1.5 seconds is probably overkill, but eh it works
In blueprints? I dont see a node that says event on acknowledge possession
Not sure if its available in bp but imo it should be exposed
Using delay is not a bandaid for multiplayer
U gotta set things in the right places
If it's longer than next tick, it'll be waiting for it to replicate. As cold said you'd definitely need to look at a different way to handle it.
Oh so I can't be certain that if a player has less than 500 ping it will always work?
How can i expose it
if you need the controlled pawn in the player controller, you can just use Possessed event
Hello everyone, could anyone help me with some apparently simple math ? I have this function that is executed every tick to find an increment to set an actor location along a spline using some fake physics, but I can't find how to make it frame independent, I tried using the delta seconds but it scales unproportionally... By that I mean at high frame rates, the train updates faster and the math is more accurate so it slows down a lot more due to friction, while at low frame rates the train also updates rather fast (I haven't measured how much faster/slower than at high framerates) but slows down less making it able to traverse more distance... I would need help fixing the function so that the math stays independent of FPS
The function : https://blueprintue.com/blueprint/fvoh_7lo/
(the value "Increment" is used every tick to find the location at distance along spline (Distance=LastDistance+Increment))
What's the goal? You want to set inventory component both on the server machine and client machine?
gentlemen i'm in a bit of a predicament
recently i came to seek help to see how i could make the weapon model independent of the camera's FOV
and i've been informed that you can use a world offset value in materials
now i found out how to do it and it works HOWEVER there is one problem
the gun blueprints themselves also acts as pick ups, which means that the offset's there even when the gun's not picked up
which gives a weird effect of the gun moving around
how can i make the offset apply only when the gun is equipped and not before then? do i need to overhaul my pick up system??????
should i ask this in the #materials channel??
yes, but im doing it on the player controller so ideally just for the respective player controller. This works fine on the server host and in singleplayer, however when a client joins the server it returns an invalid controller as it is run on event begin play and hence was called before the controller was assigned. Event on possessed doesnt help either for some reason, it actually doesnt work on the client or the server host or in single player.
I also dont see why that delay wouldn't be a suitable fix? Surely if I'm simulating everything with 500ping in the config file then I'm looking at a worst case scenario always, and so unless someone somehow connects to a host with more than 500 ping, the 1.5 second delay node would solve the problem wouldn't it?
I don't know how others do it but I have nothing on my event begin play on both the character and controller
I set my mapping input on posses for the server
And onacknowledgepossession for client
Did my cosmetic logic there too
Tested with high ping , no problem
Is there no way to access the onacknowledgepossession outside of cpp?
I just pack up my pc so I can't open the editor
Also I'm just another newbie in mp. Your best bet is to ask in #multiplayer
Anyway the problem right now is you don't have a valid controller?
I mean on posses shouldn't even run in client. R u sure that accesses none happend for the specific print string?
yeah it does, im gonna leave it on a delay for now and work on it later, ik everyone has said it's not a working solution but it allows me to test other parts of my game in multiplayer so il get back to it when i need to
thanks for your help though much appreciated
got no clue
K well when I got my pc set up again, I will play around and let you know
ty
Can u print string the controller too, I have a feeling that u might have valid controller but it doesn't have a valid pawn yet.
Just pure guessing
I have two problems here, the material is weird and some pieces are like half visible causing these
That's a lot of material id for simple object
Do you have to replicate the construction script??
Wdym by that
Construction script in character blueprint
It might be normal problem
If i implement something there then it works on multiplayer?
You are looking at the rear side
Or i have to replicate?
i made each one then i grouped them is there a better way to do it?
its all one material
I mean don't see how replication have anything to do with construction script
It will simply run on every machine
I have implemented an attached gun to the component. So it will work on server and client?
U can just use one UV and a few material Id. Anyway I think you are looking at the backpack, that's why it's "invisible"
backpack?
Backface*
how do i fix that
ok i have a much bigger issue now
my character movement legit just nuked itself randomly
completely blank
looks like i'll have to load a backup, fuck my life
Haven't we met b4
I think I used to pay you to do stuff
Select all faces and press Ctrl + N. Assuming good topology, it should fix it for you and show all blue.
For some reason my gamemode on begin play is showing an accessed non error for my Sun Variable, the sun var is a directional light contained within the player
And also even though there are no DLs in the level, no light appears
If anyone knew the best course of action Id be greatful!
The specific error Im getting also
WHAT DO I PUT HERE
A reference to w.e you are casting
Casting is just a type check
idk what the heck is a Net
I assume a random actor not using naming conventions
Ye u got a bug
you need to input a reference to the instance you want to cast to
That thing happend in 5.3 qfaik
A FOOTBALL NET
@cosmic kiln if you have source control, maybe u want to roll back. Otherwise u r fucked I think
what
i want to get the score variable from the net blueprint
Then get the net
yea, so you need to tell it which net to cast to
net itself is just a class
how do i do that
in the game it is instantiated, i.e. an instance of the class net. you need to get a reference to it somehow
Your game you decide. You need to pick some net that exist in the world then feed it into the cast
and there's a lot of approaches
this one
hell, casting should be your last resort, it creates a hard reference/dependency
Casting is just a type check. It is not a method to "get one blueprint to another"
then what do i do
Only in bp and it can't be dodged. Ppl try to dodge it with interface but ends up with hard ref anyway
R u spawning net at run time or are u gonna place it in the level?
Also put prefix like bp_net
It's hard to read
place in the level
Make an actor blueprint right now, call it game manager
done
variable of net?
Yes
how
Create variable, type net. Then select object ref
done
Make it instance editable and expose on spawn
Select the variable and tick on the boxes I mentioned
done
well that cannot be true, I have an entire inventory, interaction and electricity system while keeping dependencies in check, at worst I'm rarely casting to class pawn or character
Now drop game manager to the world
done
I love the eyedropper feature so much
You should always cast to base class when possible that's right but saying casting is harmful, I have to disagree because you can't really dodge that making a game.
It's just the price that one have to pay for using blueprint only
So if the project is bp only, cast anyway no avoiding it but you can always use soft ref to load the heavy stuff like material, mesh etc
then what
probably make it an array
since I assume there will be 2 nets?
Click the game manager u drop to the world then look for the net variable. Select the eye dropper and pick the net in your world
Ye I dunnoe what the game is about
Just gonna give example
This feels like private tuition already
that's your reference
yeah
Get actor of class select bp mamager
From the return value get net
Now that's your reference
It points to the net u selected
That's Ur net, do w.e u please with it
From the blue pin of net drag and type get score or w.e variable it has
but i want the variable here
That's Ur damn widget
And not the bp u trying to cast in the first place
Widget job is just to read
yeah
so i want to return the score variable so it displays my score each goal i score
generally whatever creates the widget should keep a reference to it and manage it
which should probably be the game manager you made
are you displaying the widget in screen space or world space?
that return value on the create widget node
promote that to a variable
before adding to viewport
ok then
get actor of class
this
yea you need to set that
ok done
call it score widget reference or something
ok then
then you get a reference to the game manager, cast to it and hand it the reference you just made for your widget
after add to viewport?
yes
just copy and paste the variable you made to hold the reference for the widget
into the manager
ok then
and then you cast to it to set it too to the same value
return value > cast to game manager
ok then
as game manager set the widget reference to the same value as the one in the character blueprint
you need to copy the variable over to it first
score widget reference
If you're using the get all actors of class, I feel like using the game manger just to get a ref to to net is a little redundant.
no you are setting the one in the character blueprint again
do i go over to widget blueprint
use the "as game manager" pin
alright
the game manager will hopefully be keeping track of the score and setting the widget instead of the player
as well as any other logic
this whole setup is scuffed but of well
it's probably fine for the type of game
what do i link to it
you set the reference in the game manager
just like you did in the player character initially
in the gamemanager blueprint?
An actor component on the game state to manage important actors and having the net register itself on begin play would be better.
The game state is much easier to access removing the need for get all actors of class which at this point could just be used to get the net.
you're 100% right that is what the game state is for
what now
I did not suggest the usage of a manager blueprint
what we're doing is instead a good approach if this was just a minigame in the scope of a bigger game
which is probably not the case
score widget reference, copy that variable from the player and paste it in there
The best thing to do is spend some time learning about BP communication before you continue. If you don't understand it you're going to run into many issues.
The premise of getting a reference is very basic stuff.
done
i did but i forgot it
as game manager, set the reference in the game manager to be the same as your player character
using the cast
where is the as game manager
in your player character
mhm
yΓ³u cast to it
get or set
set
Then go over it again lol. There's a lot of hand holding with micro steps which I feel you don't really understand.
ok then
seriously you need to spend a few days getting your basics down, following step by step instructions will not help you much
reccomend me a course
unreal courses are pretty much all horrible
ah the unreal website is fine
ok what course do i do
i thought you meant like udemy courses
I'm not sure I never watched any of them, they did not exist when I started
how did u learn blueprint communication then
UE documentation. π
should i learn from there
this looks fine
i did this one
probably do it again haha
should i do this or a visual course
the documentation pretty much covers the same stuff
which one is better for my 47 iq
I'd personally watch the course and then read documentation, reinforcement learning is king
wait that's not what reinforcement learning means
how does the documentation work
do they give examples or tell yo what it does or what
it explains the different approaches to communication and its advantages and disadvantages
you can just look at it yourself it's not long
imo much better and faster than any course could be but people learn differently
do what works for you
can you send
I'm picking up rn. Youtube and type the title
and guys you know poppy playtime the game
was it made using blueprint or c++
Packing
nothing in that game that couldn't be done in blueprints
what aside from multiplayer cant be done in blueprint
it's not so much about what can't be done
and multiplayer can definitely be done in blueprint
it's often a matter of things being a pain to do or running very slow in blueprint
there's some engine functionality that just isn't exposed to blueprints
could i do a full blueprint game with the stuff needed in c++ as bought assets
maybe
Very slow is a misconception. In most cases performance is negligible unless you actually need multi threading.
there's an inherent cost per node
it is negligible generally
but sometimes it is not
any kind of heavy checks, calculations etc. will be much much slower
For heavy calculations you should use the math node.
the operations themselves not
yea, that is just C++ after all
I was thinking of, imagine you need A* pathfinding
any kind of recursive/iterative algorithms are hell
Then I would use UE's built in path finding system which I'm pretty sure is A*.
I can remember reading a post a few years ago of someone implementing their own A* in BP and it worked fine.
Blueprint multiplayer is very limited
Don't take my word for it ask in #multiplayer
last time I checked it is heavily limited to a generated horizontal navmesh (though it can be generated at runtime)
doesn't work for many games
If the game doesn't need to care about ping. Eg chess, then I wouldn't mind using bp only
it's all fun and games until you try to change the movement speed
though the replication the movement component does for you by default is super impressive
Expanding cmc is for intermediate. Luckily someone covered it... otherwise I wouldn't be able to implement it on my own
And that's where bp hit the wall too
U can't expand cmc in bp
Cpp only since you have to change the byte flag
I think changing walk speed is fine, problem is for something like sprinting, crouching etc
yea, change in runtime, I meant
Lots of fake tutorial in youtube doing sprinting in multiplayer with bp only
What do they do?
realistically, I need to either make my own movement component or really make sure I understand the existing one and it's quite intimidating
They implement their own bool for sprinting
Then show that it "works"
But the truth is add a little lag like 5 ms. Surprise surprise game broken
Player get rubber banded every frame
hate having code in my game I do not fully understand, some of my approaches feel super hacky
Someone did. Took him a year. The very same person that guide on how to implement sprint in cmc for multiplayer
Mover 2.0 coming in 5.4
Maybe that can be the saviour
Cmc is made with capsule collision in mind too
So if u need a custom collision then rip
There is general movement component in market place that address the issue. I think it cost 350 dollars at least
I'd pay for it but then I'd have to understand how that works and that doesn't feel much better
i don't but i had a backup it's alr
I just don't want to have an opaque black box that handles the movement in my game π
Make sure the detail panel is there
what is the parent class of yours?
reparenting tends to fix most corruption issues
if it's child of a child of character for example
reparent to character and then back
So to my understanding, the player start needs to be half way into the ground for VRPawn to spawn correctly, well my player start wont actually spawn my VRPawn and infact sets me to spectator mode and spawns me at the world origin, I have no idea why and Im at a complete loss
Read the warning
If Ur player start collide with something, it's going to fall back to doing something else depending on the spawn rule
Maybe there is option to spawn anyway while ignoring collision.
Select your player start and look around for the spawn rule
Ok Im an idiot I fixed it, so the player start has to be half way into the ground due to tracking capabilities, however, my VRPawn had static meshes with collisions enabled, so it was never going to spawn, jesus I was about to start ripping my hair out big time
Thank you @frosty heron for responding to my cry for help tho, if my brain hadnt have started working you would have been my saving grace
Doesn't the math node just construct a graph of simple math operator nodes?
IIRC you can open it to reveal a collapsed auto-gen graph
yea it does, good call
and crash prone in 5.3
From my understanding, that's just a visual representation. It's closer to c++ performance when handling complex equations.
It was many years ago but epic mentioned it in one of their live streams.
apparently they were changed to the collapsed graph setup later on
might be a similar situation to blueprint nativization
i'd love to profile it but a lil busy atm
it is
General question : If I make a project template with alot of stuff in it (blueprint actors, gamemodes, etc...) to sell it on the marketplace, is there a way for the buyer to "reset" the object to the state of when he bought my template in case he made some changes ?
By that imagine, I created a template and inside the BP_Character, I have an actor component handling the health for the player, and I wrote a logic to clamp the health to not go below 0, not going above MaxHealth, a method to catch damage, etc... And the buyer went into that component and start messing with the stuff I made to do some tests or make it fit his needs. But the buyer messed up the things and want to get that component back to its original state, with the default value I set, the logic I wrote, etc... without having to create a new project with my template. Is that possible ?
Interesting, if that's the case I definitely missed the change. I have used the math expression node before and found a slight improvement in performance when profiled. It would be nice to know if this is still the case. Of course if they've made performance improvements in other places it might have become redundant in that regard.
when you add the component to a character and change the values you're only editing the instance
or rather how it is instantiated I guess
the default values will be the ones that are defined in the component itself
But what if he starts touching the actor component itself created outside of the character ?
yeah I'm more talking about if he changed that part
This is where creating a child comes in handy if they need to do more that change the default vars.
to revert, the buyer will have to import the asset again
I think you are worrying over nothing
asset bought from marketplace is just copying to the project
It's just a genral question I have (I'm not doing a project like that currently π ) but that question popped into my mind
this is entirely the buyer's responsibility, all you should do is provide an artist friendly setup with inheritance
if they mess with the core functionality that's up to them
Does anyone know how to only show actors in the level outliner that are of a specific actors (or child of)
Yea, I've had a play but can't do it. (not sure if it works) I tried the same thing that works in the content browser but it doesn't show anything.
If you created a new filter and type in the "Filter String" the keyword like a keyword in the name of your class, it should work properly
Like for instance
That's still only based on the actual name as opposed to the class.. So if I have an item base class called BP_Item but create a child that's call BP_Rock, the rock wouldn't show.
I see. But maybe then you can change your naming convention, to always have the name of the base class first then the name of the child class. Like instance of being BP_Rock, it could be Item_Rock ?
I could but then I'd also have to make sure other things don't include that section.
what do you mean ?