#blueprint
402296 messages · Page 645 of 403
Good day, guys I have a question since im new to blueprints. I'm trying to get the AI to stop attacking/ disable any movement when the player dies so I've tried different things and searched for long but to no avail. These are my nodes in the base of the ai. So what should I do here or in the ai-controller blueprint to prevent the ai from doing anything when the player's health reaches 0?
GOAL: make a mesh rotate based on camera direction
It bugs out and everything spasms like crazy though. I've been debugging this for 2 hours now with no advancements.
here's the code
and here is a short clip showing what's happening right now if I use this approach (SEIZURE WARNING):
What collision preset would I need for a pole that a pole vaulter would use? I would like the character to not be able to push the pole through anything OR continue to look down once their pole hits the ground.
Have you tried setting the rotation using SetWorldRotation instead? Because you are using world rotation to modify the relative rotation at the moment. Or vice versa
Oh, I can see in your video that the camera is attached to your mesh, so as soon as the mesh rotation is updated it also updates the camera rotation. Which is causing the camera to "spin" around the mesh. Basically creating a loop.
I think you could fix this by attaching the camera in a different way where it isn't dependent on the mesh Loc/Rot
Hey guys, quick one, when I jump using this system (off the Left Right axis) when I fall from a jump, I SLOWLY descend. What gives?
I'm using Jump and StopJumping too
The jump works fine, however it's like gravity is turned off once I get in the air but I slowly fall back down over time
My gravity is at 4 when landed and 6 when falling
Anyone?
Thanks! I just realized that myself too.
I can't get my Player Camera Manager to "possess" the camera inside whatever pawn is being possessed right now. Has anyone ever gotten the Player Camera Manager working? Documentation is laking in regards to implementation.
I want to use it so that I can comfortably limit values like Pitch and Yaw without any low-level work.
Right now I can either make the manager work and have the camera not work or vice versa. I can't figure out how to make the manager actually manage the camera of the pawn.
A simple fix could be to attach the mesh to the camera with the appropriate offset? Then you wouldn't need to update the rotation using BPs at all!
thought about that too but I want to have the vehicle rotate "smoothly" later on. But good idea anyway haha
Ahh, that makes sense!
question, how could i add impulse onto an actor that isnt a static body with simulate physics ticked?
i have enemies in my game that run at you, and i want the players weapons to knock them back when hit
but it doesnt work unless they have simulate physics enabled
im no expert but wouldnt you just add an impulse to a bone
well id assume so
try playing around with that
do you want the enemies to ragdoll or just simulate getting hit
i want the enemies to ragdoll after dying, which i already have that
but
i also want them to just move back a little bit when hit
aaaaaaaa
you can check for a collision and if its true then play an animation
that doesnt make sense tho why do i need an animation for a physics thing
its like needing a reload animation to get a reload function to work
id wait for someone else's help regardless, but simulating physics means ragdoll
so im pretty sure you need an animation
@void cobalt you could try changing the hit character's velocity into the opposite direction... iirc CharacterMovementController might have some functions you can also call to add impulses
so should i do that in the character controller?
or in the enemy bp
@earnest tangle
Whichever works. It may be simpler to do in the enemy BP
ok
I'm trying to add an offset to each spline point, but I'm having issues getting the location of a spline point and adding a local offset to that point. Instead I'm offsetting the entire spline
@void cobalt are you talking about knocking the entire character back or making the skeleton respond to an impulse? Like should the character capsule move or no?
Figured it out
would it be a sin to use a empty level with a delay as a loading screen, the level streaming process seems overly complicated for no reason
@faint pasture sry i went to walk my dogs
the entire thing
i want to move
not just a visible hit
i want the whole capsule to move back
@blissful gull Hard to say without seeing the function. Looks like you're inputting min+1 and Max-1 somehow.
if i add 1 to max and subtract 1 from min it messes it up going the other way
Can only throw random guesses without seeing logic.
Is that a default node, or? It's not in 4.25.4
right?
How about just doing the wrap yourself?
oh waow thats ugly xD
i'd just put it in select nodes
but i guess the result is the same
i dont like sequences at all i'll admit
Mostly because im not 100% sure how they'd execute
like, are they guaranteed to move along the same executionline untill it ends or it encounters a ..... not instant node (Forgot the word),
They'll follow logical order if there's nothing else on the line, but they're still a bit ehh.
It's either that, giant mazes, or lots of nested blueprints
There's no automated way to get all subclasses of a class right?
I feel a general slowness in the editor in my project. Such a thing does not happen in a project I just opened. As if FPS was a little low in the editor
Has anyone encountered with this?
Correct
the word you're looking for is also probably latent or asychronous
I like them sometimes if I need to do several branches or such. Having to connect both true/false ends of a long branching bit can be a bit iffy, so it's sometimes nicer to do a sequence per branching code
They've just always had this feeling of being a perfect setup for a race condition issue ...
but if they are fixed like that, then it should be ok i suppose
You can do some cheeky things with them such as running a do once node and then immediately resetting it
:D
Is there a way to set the terminal velocity via bp node?
@trim matrix Depends. Usually that'll happen if you open badly optimized maps, or if you open a bunch of different windows all at once.
I dont have any map right now
Does the Floating Pawn Movement come with a geteable velocity value? I can't seem to find it... (trying to display current speed of a pawn)
I only ever notice that when I have like twenty windows open.
Fairly certain editor lag can happen too if you have too many open blueprints like this
atleast according to the doc center and how it should work (inclusive)
custom wrap function is just this
works as expected
I'm sloppy with blueprints, but damn, that's horrid
No that wouldn't work right either... if I you had a value of 7, with a Min of 0 and a Max of 5, you would get 0 instead of 1
Wowwwy
when it says inclusive, i read it to be inclusive the 0 and 5
or do you mean you'd expect to reach the amount of overflow that occurs?
Hey, do you guys happen to know a sweet way to get to the Terminal Velocity via bp? The only way to access it is through a physics volume and I need to switch it on the fly
in this case 7-5 = 2, so 1 since thats the second number relative to the overflow...
.... you're not including 0.
Min of 0, Max of 5 = 6 values total
if I input 7, i would expect 1 to be the output.
dunno how wrappers normally work, but i wouldnt expect overflow like that, but i could be wrong 😛
any number above 5 would become 0 (min) with the function i did
any number below 0 would become 5 (max)
For the usecase of going + or - 1 like this tho, it would work like a charm
True, but that's not the intention of the disfunctional wrap function that's included with UE4. It's supposed to take any input and wrap to the appropriate place within it. You may not be adding or subtracting by one at a time always. If you ever say wanted to skip 5 days on a 7 week calendar and it's Saturday, you don't want to end up on Sunday.
But even when you do, its wrong ..
Even when you go +1
When you reach 5 and go +1 with unreals function, it returns 1,
which is min +1
That's why I said the intention of the disfunctional wrap function.
I understand it's not working 😛
Ah
well one could store the overflow and go that amount forward, for sure
and repeat this until there's no overflow
Its a fair point with the calendar example etc tho ^^ Makes more sense for it to work like that
Can I get someone's help?
I've have a multiplayer game where players can change their character colour and name tag, (this happens in the lobby level). I want to carry those variables to the next level (game level) then replicate them, how would I go about doing that?
Couldn't you detect overflow (#>B), divide by the difference, add remainder to base number?
Sounds more elegant than any of the solutions so far
Guess that only works when you go over
Hmm yeah that should work!
Anyone have any tips as to how to stop this from happening?
Between wall slide and landing, sometimes I randomly gather momentum and can launch into space
Could cap momentum.
I tried, but I don't think I found the right method
It's something to do with the Default Terminal Velocity but I can't reach it via bp
Or print out the states to see when it's being added
Yeah...but I mean, from what? I have been studying it for hours ahah
Velocity just tells me my speed
Or where I am in the world
Could be something like jumps are repeating when colliding with the wall sometimes
The gameinstance is not destroyed between maps, so good place to store *persistent" info :)
Just found that out, I've tried casting to my gameinstance but it fails
So the host can send info to the gameinstance but how would the server (host) get the other players info?
Rpc
Client->server communication is done only through RPC
I highly recommend reading the network compendium (pinned in #multiplayer )
Will do
How would I go about exporting capsule motion to 3ds max?
Hello, im trying to add a sphere trace to my weapon animation but the animation is too fast so there are gaps in the sphere trace. Does anyone know a way to reduce this gap? something similar to the image below. (I would just but this but my project is for mobile)
attack animation*
so I made a basic car follow a spline path but for some reason it only follows the first spline I put down instead of multiple splines, I assume it has something to do with this array but I'm not sure any suggestions would be very much appreciated
Is there a way to get the Character's movement direction? I need to compare the direction I'm moving vs the direction I'm holding with the left control stick. It is a 2D game so I need to trigger different animations based on the angle I am moving. I was able to find something for the control input (see pic), but not movement direction. Thanks.
get the X rotator of the acceleration
err velocity
CharacterMovement -> Velocity -> RotationFromXVector
Can I ask a widget bp question in here
got it
i know its a bit dead in there atm, but people do come by from time to time
here's the event graph part of the car spline, I thought getting all actors of class would do the trick but i fear it may be more complicated then that
@frozen nimbus there is also a CalculateDirection node.
If I have an item in my inventory, can I do something like this? Will the soft object / instance in the inventory now have a modified ammo amount?
or would I have to keep an array of structs instead?
@round edge the instance will until it is unloaded.
it would not retain the new value unless you serialize it
right I figured I'd have to save somewhere
trying to make as generic an inventory system as possible. Hopefully all from one kind of struct. I doubt I would need to modify stuff like this very often. It's more likely I'll save out an item instance from an actual object into my array. Just making sure on the off chance I needed to change something that isn't actually spawn that I could.
what you could do is some kind of delta serialization.
Eg, you only save an asset reference, property names, and the new value.
this is a new concept for me, but sounds like I would want this
it would require you only ever load assets through one path, and part of that is applying the delta serialization.
You can do this in BP. It would be easier with some C++, but not worth your time to learn & get good with C++ just for this.
I could probably manage some c++
And I would suggest that you don't do this for every property.
Only the ones that you cannot reconstruct
(because when you modify them, you also have to track that!!)
What most people in BP do is the save game API
Each BP can be in charge of serializing itself to JSON
and everything has a GUID
it saves to disk as TMap<FGuid, FString> where the value is the JSON node
you can do that in BP as well!
might be eaiser.
which part? the json method?
my thinking prior to your suggestions was to have an array of strings or something I could read in to change specific properties
what I just suggested is a more robust method
this is what I would try first
I suggested this because you seemed to be after the control
it also is better for save size
but you can adapt this to be more space efficient.
more or less my goal was to use the same storage component for player inventory, chests that don't have a physical object inside, lockers that leave a physical object inside, and things like magazines
Anyway, see if you can piece together everything I just suggested
its a lot, but there's solutions in there
I think I get what you were saying, just making sure we're on the same page
thank you
Thanks! I’ll give that a shot.
Is there a way with blutilites to spawn an actor at current selection with a button?
Can you have a montage with root motion going, and still allow for input movement/rotation? Is that even a thing?
could set up slots probably. I know I can blend a montage to only do the top half of the player while my animation controls the lower half
Hi, im new here, i got a question about a issue with the game im making so in which channel do i ask?
thanks will have a look!
anyone had experience settings up the listener for an RTS style camera, where the camera is offset from map ?
Is there a way to get the Oculus Quest button mappings as events into blueprints without setting up an axis or action map? Im seeing all of the buttons when going through the axis mappings but they dont all show up in the BP input section
I can't find what it means my "create a new transform variable and name it spawn transform" there's a lot of stuff coming up when I look for transform but none of it gives me this
Please ping if you reply!
Right click on that orange "Spawn Transform" dot on the SpawnActor node and select promote to variable
Thank you!
Sorry for the trivial question, really new to UE4.
gotta start somewhere 😅
i have set up this code for a death/respawn command, it works, however, each time i respawn the actor it just tposes, let me know if theres a fix to it
Is there a way to move my blue prints from side scroller to third person?
it can also be done with the same process as creating any other variable. You'll really want to know how to do that.
Then you can pick transform from the type picker widget.
There isn't really one specific way, there are all the ways you would normally move files and then there is migrate.
What specific query do you have; that is to say, what is your primary concern or blocker?
im not really sure what's going on here, but I'm trying to expose a TMap of an enum to a TSubclassOf variable to the editor in my custom GameState. I have it UPROPERTY(EditDefaultsOnly, Category = "Movement") but any blueprint classes I make of that game state class do not have the map variable in class defaults for me to edit. am i missing something simple? I've made tons of classes with exposed variables this way and never had this issue
Like the blue prints are different inside the character and also for some reason in third person if i make a child of the character i cant edit
public? Also if you're going to ask a cpp question you should use the literal syntax or more precise language. I almost corrected you.
Questions like this (around the BP boundary) can be asked in either channel but your chances of a good answer are higher in #cpp
@still trellis the other possibility is hot reload
if you use that, swap to LiveCoding if you can
i've restarted the editor a few times, it doesn't appear to be hotreload
protected:
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Movement")
TMap<ECustomMovementType, TSubclassOf<UCustomMovement>> MovementMap;
you have logic you want to move, but the types aren't compatible.
copy and paste, start with the innermost functions and events, and move outward. You can right click create variables
on the grey nodes
also you might need to make the same types.
Good luck if you have a type in each project named the same but with different layouts
update, i copy pasted this EXACT code for exposing the property into a random other class, and i can see it just fine. its only gamestate subclasses that dont seem to let me see exposed properties in the editor
and what does the UI look like?
try changing the category
it might be a hideCategories
i put it into the movement component and it looks like this, which is what i want
https://gyazo.com/39a216b2553126c93f27a925e34fcc4f
in the game state the "movement" category just didn't exist
sec ill put it back with a different category
Im folloing a tutorial where he does something im sure can be made in third person but he makes it jn side scroller so im having a hard time to do it
Well I can't sit on your shoulder
Try building up to the cool thing you wanna take. Get practiced with smaller concepts
there isn't a mapping or any kind of tool for what you want
Ok
Not to push you away, sorry if my tone reads like that
Good luck, this should deepen your understanding and you'll have an easier time of things
changing the category fixed it, no idea why
Oh its no problem 😅thanks tho
hideCategories?
is that something in the gamestate class?
i didnt have anything besides Blueprintable in the UCLASS macro
wonder if AGameState does?
maybe i shouldn't use the generic word "Movement" as a category i guess
sometimes things just are the way they are
what else would you use?
"Custom Movement"
it wasn't an unreasonable pick.
Well, you can't use it so custom movement is probably next best thing anyway
https://gyazo.com/2e194626fec4b3e37209b0e4c9a0e0e0 ill just leave it like this 🙂
to be young and free 😂
while im on the topic, and this is more of a general question than a blueprints one or a cpp one, where am i supposed to be putting something like this? its just a global, universal dictionary that tells me "this enum translates to this class," and it should never ever be changed at runtime or accessed outside of cpp getters
but i want the ability to use blueprint classes, so i can't just hardcode it as static in cpp
Maybe a data asset? I can't say if this is the Best™ approach but it is an approach
(obligatory Mathew W video https://youtu.be/hcwo5m8E_1o)
I would personally choose a UDeveloperSettings subclass for that, it'll be saved with the game's config and be automatically available by the time StartupModule is called. No need to worry about whether or not the DataAsset is loaded, keeping it loaded, and finding ways of efficiently accessing it if you need to access it a lot.
You can technically still modify it with GetMutableDefault<UMyDeveloperSettings>()->Foo = Bar; or const_cast
Hi I ran into a problem
for some reason my game is not spawning the player character and the camera is stuck at the origin poijnt of the world at 000
I'm not exactly sure what could cause this
I checked the gamemode settings and its all exactly what i put in
It was working a few minutes ago and i didnt change anything regarding the player character
okay I fixed it but its got something to do with a model that is somehow messing up every single model in the game world as well
Can u guys help me... To make curved material like endless runner games
Hi, can someone help me with this error?
I´m trying to call the widgets of all PCs to update on UserData RepNotify
But i keep getting an error like the server is trying to read the widget, but i call the event on OwningClient
i create the widget client side
I got my box collision set as my root component and both it and my projectile are set too block all but it still falls through for some reason
what I know is that the accessed none error is because your reference to Lobby WB is empty. So you are using it before you've set it.
I have set it but only clientside, so i think it´s trying to read it serverside
But i don´t know why, cause on RepNotify i´m checking if the PC is local PC
Where is UserData being set for it to have the rep notify be called? It may be that the local client hasn't started its begin play before this is being called.
Not specific to Blueprints but I use them so writing here.
I have built a notification / caption system for my game. These use "text" as the data so should be good to localize.
I also want to store all caption lines that have come up into and array so the player can open a log and go back.
My question is, is it better to store this log as text variables or strings?The lines will not need to be translated anymore as they already have been and are in the correct language.
are there physical material presets for Steel, Wood and Rubber?
or do I have customize physical materials for each of the three in the best possible way.
I'm confused, why do my spline points not match up with the locations being referenced?
Derp, had the second spline attached to the main spline, shouldn't have done that
are there physical material presets for Steel, Wood and Rubber?
or do I have customize physical materials for each of the three in the best possible way.
If you can't find them in the physical materials lists then chances are the answer is "no"
Hi, I got this weird isse with Structure. I made a "Actor Action Utility " and a function to do something. But when I used that function, this Array Structure can't be expanse to edit 2 variable in it ?
Is this a bug or I missing something ? I use 4.26 btw
Hello
I am working on a custom locomotion in BP. But when I walk up a ramp the movement vector gets skewed like this:
https://puu.sh/HrMhN/f59e4c3da9.png
I use project vector on to plane like this;
https://puu.sh/HrMl8/efac802869.png
but I feel like something in there is what causes the skewing.
Anyone got any input on this?
Thank you in advance
Is there anyway to make a animation blueprint play after re spawning a actor
After you spawn the actor, have it play a montage
I would make an event called just respond or whatever and have that event play the respawning montage on itself. Then whenever you spawn the actor from wherever you spot it from, just call the event
I only used montage for a dodge animation, the idle and jump are normal animation tied in locomotion and walk/run is a blendspace, so is there a way to make it play again once the character respawns, it just tposes
Not sure if what i said makes sense but its the best i can do
Do you have the animation blueprint assigned as default?
Like why would it use the animation blueprint the first time it is spawned but not the second?
What do you have set for the animation instance in the skeletal mesh component in the blueprint?
Yes
Are you sure that you are just spawning the thing again? That doesn't make any sense that it wouldn't use it. Is that the only place you ever set the animation instance?
Im trying to find the animation instance ( new to unreal)
It's a property of the skeletal mesh component. you can either have it just continuously playing animation or use an animation blueprint.
I'm currently building my first game in unreal using the blueprint system, and I have a bit of a problem. When my character jumps on an enemy's head, if it fall off of the enemy, it goes through the platform. I'm sure it may be a small issue, but Idk what it may be..
I have a switch that when activated, I want to change the base color. Is it better to change what material is on the mesh, or to just change the base color texture within the same material?
Hi all, can anyone help me with this? I have a number of actors that share the same blueprint, and I'm trying to make them default to a hidden state when the level they are on is loaded, so that they can be un-hidden with a button toggle on my ui. This doesn't work, the actors are still visible when the level loads.
This is probably producing an error I imagine? The Length node returns the number of items in an array. So if you had one element in an array, it would return length of 1, but array indexes start at 0 so by plugging the length into the get, you're getting an index that is out of bounds.. If you want to do something for each actor in the array, then you should be doing a foreach loop.
Thanks.
Do you have any idea why this is? The button to unhide the actors doesn't work until the third hit, then it works as expected. The first two hits do nothing, or, keep the actors hidden.
@south merlin I would say neither. Swapping out textures is or materials is more expensive and complicated than it needs to be. Instead of change the base color texture, just multiply the texture by some color. So if you want to change to blue, multiply the texture being piped into the Albedo channel by a Color set to a blue color. You can have this Color be a parameter that is just set to white by default, which when multiplied by another texture will result in no change to the texture.
@covert kestrel What are you trying to do?
Also, if you're uncertain why things are happening in a particular way, I would recommend setting breakpoints in your BP and just stepping through it node by node
I'm getting some screen tearing, is there any techniques to alleviate it? 60fps
A level loads, the actors on that level are hidden by default. A button on my ui can toggle the actors on or off. The button works, but only on the third hit.
Unless I ditch the branch and double up on blueprint nodes, not very tidy.
@covert kestrel You don't need a flip flop node. Just use a Branch (aka if) node
Flipflop isn't really needed. Don't even need a branch.
actually yeah, yuo don't need that either
yeah, exactly as Datura said ☝️
but @covert kestrel , you're also running into an architectural issue here. You've created this concept of "hiding all of these actors of a certain class", but you're actually repeating your logic in two separate places. Once when the level starts (I assume in the level blueprint?) and then also on your UI element
Repeating logic is a great way to run into bugs later down the road since you have to manage two separate places that perform the same logic. A great programming maxim is DRY (Don't Repeat Yourself). It keeps your code neater, easier to understand, and more bug free.
If you want to keep your code "dry" in this case, you should extract that Hidden variable and all that logic from Datura's blue print example into some function or event that can be access by both the Level Blueprint as well as the UI element
Lol, sorry, I'm way down the pecking order when it comes to blueprint and coding abilities, it's not my 'forte'. I'm just trying to get things to work as a proof of concept to my company first and foremost, and trying to pick up as much as I can on the way. When I do get something to finally work I'm buzzing my tits off. I've picked up a bit of knowledge on custom events, and interfacing between blueprints for example, but then I go weeks without touching unreal and have to try to remember all that logic again. Stressful. Thanks, I'll consider what you've said, and look to implement an event, I guess in the game instance.
So much simpler, the NOT node is the key there?
Essentially. You're not really needing to check what the value of Hidden is using a branch as you're following the same path regardless, and a flipflop doesn't suit the situation either as you don't have different operations that need to happen with each press of the button.
So just using a logical NOT makes it simple, whatever its value is currently, you want the opposite of it and then apply its value to the hide actor node 🙂
I've just tried it and it has no effect on the first hit, but works as expected form the second hit...?
The default value of hidden may need to be reversed.
Works as intended. Cheers. I just need to understand what the NOT is actually doing, some sort of invert action?
I've just had a lightbulb moment re the NOT.
It's a logic node, like AND, OR, XOR, NAND, etc.
So if you feed in a value that is true, it returns false.
If you feed in a value that is false, it returns true.
I understand the difference of these now
https://streamable.com/agvkkp im using ik to move the hand to a socket on the gunb
why is this happening?
ive tried multiple setups and this is my current one
Hey guys, when exiting/quitting my game, it's still in the task manager using resources. Any tips or keywords?
https://new-cdn.80.lv/upload/content/8d/5eb161e382ba8.jpg what is that node with root and target? how is that possible?
There is a variable called "Root" that is contained within the "Active Child" object. You can drag off pins from objects to get or set variables within the object.
The "Target" pin is indicating that the object to be updated is the "Active Child"
yeah i know, but i dont know how he has a target on that second blue node
and how can i do that?
You drag a pin off of an object's reference and do a set <varaible name>
when i do that from active child, it give me one without a "target" pin
im getting htis weird error when i open a blueprint and it gives me a blank screen
see? when i click root now, it just places the same as above
Uncheck context sensitive.
If the "Root" variable is not of the appropriate class, it will also not have access to the variables you're expecting.
aah, okay now i see! Thanks!
Guys I having a bit of a problem here, I using fixed cameras. Now i want to make it so when i press up it moves up, press down it moves down left and move left and right move right. But instead I press left to move up and right to move down for example. Sounds like a simple problem I cant figure out. Please anyone can advice on this????
anyone good with Advanced Locomotion System V4
willing to pay to fix a bug
with a fresh import
Hi! I tried to find an answer in previous discussions without success. My pawn has a box collider that fires other collider BeginOverlap and EndOverlap same time constantly and creates infinite loop. Does it have anything to do with UpdateOverlaps? I have tried different kind of collision settings for both and collisions should be enabled. Any idea where to start to find what is causing the problem?
@thick geyser are they both set to overlap each other, not block?
Yes, they overlap and I checked that it is the right collider which is triggering overlaps.
hmm, could they be doing something during the event that could trigger end overlap?
like moving or disabling collision
I haven’t set disable collision at any point. First both of actors moved but I set the another one to not move and it is still firing more than once but dont create infinite loop anymore. 😄
Okey I will try that.
does ik modify a current animation?
@narrow kelp actually it wouldn't work or I just don't understand how to do that. I can't change how the pawn moves.
Could try having both behaviors start from just one of the events
So no one in here knows where to start with my problem? lol
for example your pawn gets the overlap event, then it does its behavior plus whatever the other actor needs
Right gonna try official ue4 forums.
In fact the pawn doesn't have to do anything when overlap. It has "big" box collider and when it overlaps with another actors collider, this another actor should move only.
maybe just have the overlap event on the other actor
I'm streaming levels in like this. Problem is I want to unload the level by tracing to one of its actors (a landscape).
How does an actor get a reference to which streaming level it is in?
I have made a Function Library, But I can't seem to watch the logic flow through it in simulation mode..... I can do this with a macro, very helpful. Is there a way to get a view of the function insides?
@narrow kelp Sorry, I explained incorrectly. Overlap event is on the other actor not in pawn.
is it becuase its in a library that is the issue?
I don't think that can work because there's no object to select to watch
@mellow folio yea that is what I suspected, so I guess the next best is to test it as a local fuction and then move that to a lib when it actually works?
or maybe use a local macro the same way you think?
there are lots of other ways to debug
if it's not working the way you want just do a bunch of print strings to see what the values are at each step
Do input objects involve children of the parent object?
If you mean, you have a node that takes a "Character" reference as a target, and you have a reference that is of a class that is a child of "Character", yes.
@dawn gazelle For reference I have a Weapon Base that I was going to derive children from. Can I set an isvalid to check if the input object is "WeaponBase" and have it also take into account the children?
@mellow folio Well, I suppose its the best fail in the world when you realize your code is smarter than you.
it was doing exactly as it should, I just didn't realize I what was telling it
Gotcha, thanks
Hello, I have a linetrace that happens when you left click and I would like to do something based on what the linetrace hits. I know I can use branches until it returns true and then it will execute the code. But is there a way to have a node that has all the code and the ActorHit gets inputted into said node, and it finds which actor is equal to the hit actor then executes that code?
Sure, you can create a custom function that takes a HitResult as its parameter
Right, but I would need to do multiple branches until the hit actor equals one of the branch conditions.
I didn't know if there was a way in which almost like a select node where the code is predetermined and when the index equals one of the indexes on the select node, it would then execute that code.
hmm yeah not sure if that exists 🤔
Ok, so I should just keep using the branches?
yeah that should be fine
Ok thx.
This is from the "low entry extended library" free on the marketplace.
Just realized it won't really work well at runtime tho 😛
How come?
Because spawned actors don't exist until the game is running... So trying to say "is the hit actor this particular actor" doesn't work. Not sure if this is checking the class of the objects
That'd work as long as you assigned the actors into variables at runtime and connected those variables into the pins
it's probably not a whole lot better than using a couple of branches though :P
Yea. Maybe I could use a switch and get the class of the object hit and then get name/string and then just use that?
at that point I'd start wondering if it's worth it
you're just making the code more complicated and harder to understand
vs. a regular equals comparison and a branch
you could try a base class or an interface
I like the interface idea
hi everyone, im having some trouble with collision settings. I attached an actor (has a skeletal mesh + sphere collision for interaction) to the mesh of a character, and then I want to trace for attached actor, but it does not return. I created a custom trace channel and tracing along that returns the actor's "intractable area" but not its skeletal mesh. Im not sure how this is possible unless attaching causes the character mesh to "eat" the actor mesh
I do have a base class, but when you left click, it responds differently depending on what your holding, and what actor was hit.
could do something like a multi line trace, going through each actor asking if they can respond
have a general query on the base class and override it on child classes as you need
so for example you have a function TryInteract that returns a boolean
Or just have the function on the object handle the hit is an option too.
Again, this is why I like the interface idea... Then you don't have to cast and just pass the actor reference through.
Ok so for the interface idea your saying when I left click and do the trace, it will do the interface for that object that was hit? That might work, however other checks will have to be done as I need to check what tool I am holding (my game has a tree/stone harvesting system), and then check if the item hit is of type harvestable. I also have a placement system where you can place machinery so I have to do a branch to make sure that a bool isnt true which is fine.
For which part?
as an argument for the interface
then the objects can decide what to do
by looking at the player, or whatever args you pass
Oh, so your saying to have some of the checking code to be handled by whatever actor was hit in the interface?
generally thats how I'd do it
I see. Yea, I have tools like a stone hatchet/pickaxe, and a metal hatchet/pickaxe so I guess I could a float on the player that holds the damage that they will do as for the harvesting system I use apply damage.
Yeah if thats the case you can just pass the damage value
Nice, I originally thought about using an interface but never thought if it could work I will give this a try soon, thanks!
Does anyone know the limitations of setting a blackboard value to an actor?
I'm able to set one value to an actor component but i can't set another value to a regular actor?
@noble sentinel not 100% sure, but i believe only controllers or AI controllers or something have blackboards
if thats what you're talking about
I'm setting it within the AIController
During run time the SenseList gets set but the PatrolPath doesn't
I've debugged it and during the set call the patrol path exist perfectly fine
The first image you see is the AI Controller
From the looks of it, the only thing that could be wrong is your string or if the patrol path is actually null at that time
😦 that's what i keep thinking too but during debug it is definitely correct and as for typo, i've copied pasted the literal string to double check too
Only things I can think of are things you've probably tried.. see if it ever gets overwritten, see if it gets destroyed..
What is the function or event being called and what node is executing everything
Hi everyone, have started fiddling about with Unreal 4.26 and started working with blueprints, so please bare with me.
I've created a simple blueprint that contains some logic and a mesh representing the boat.
When placed in the environment, I'd like to have the boat travel in the direction it's facing
when I press a key. The main goal is to place a bunch of these objects in the scene, then have
them all start traveling in their respective directions on key press.
My blueprint seems to work when I place the object in the scene, but only for that most recently
added one. None of the other ships will start traveling.
I guess I assumed the logic would run on keypress for every instance of the blueprint in the scene,
but I guess I might have a fundamental misunderstanding on how blueprints work.
Any advice to help me get going in the right direction on this?
My blueprint in question
The timeline is just increasing the x value of the vector more and more over 60 seconds
note, they all do start moving if I just hook it up to eventBeginPlay node
so maybe it's input?
Could be that the player controller is possessing a single pawn
also be aware that input is "consumed"
so you have to turn that off to allow other things to receive it
Quick question. I am trying to get this function (The UI Warning) to only run once. I tried this, but this did not work
Figured it out nevermind
@narrow kelp thanks for the help!
I was just being an idiot, I didn't set a default value for the Variable Name, I assumed it would just take the variable name ...
Is there a way to fix the little bit of choppiness with animation state machines?
if anyone could help me with this it would be awesome, im using level streaming between my different levels so i can incorporate loading screens, but when i load a streamed level, my player doesnt spawn in the player start location, i even tried setting my actor transform to the same location as my start upon the level finish loading, but still doesnt work, does anyone have any wisdom they could impart perhaps?
@silent vortex that is super vague
Ok. Currently I'm not near my computer, but for example when my character is walking and I press the attack key, they slide on the floor and continue attacking. Jumping interrupts attacking though
I can show the blueprint tomorrow of where the problem may be
it sounds like you need alot of stuff setup
- make sure the animation is being fired off once (DO not let it interrupt while the animation is in progress) unless you are intentionally allowing it to animation cancelling
- if you want to move & attack at the same time you either need an animation to do that OR do animation blending (preferred)
Oh ok, so like a boolean to check whether the character is moving or not and have an animation for both?
so
you can programatically code it to have a boolean when you can and can't cancel/use animation but
i would suggest do it within your animation blueprint
^ this is an example from my project
this example though only covers movement^
Oh I think I'm probably using the budget state machine, this looks so much less chaotic than the one I'm using
The one I'm using is the enumeration way
Wait would this work for a 2D side scroller
It's 2D pixel
then this would be over kill
mm though it probably would be advised for "proper" placing of the logic but i haven't worked on 2d game before so I can't speak for 2d game
Idk, I think I'll give it a try tomorrow, tbh it's a minor problem compared to my enemy character lol. I got him to attack and to die, but movement is a different story
the trick is to keep the state in which your character is in
"on land/air", "can attack, can't attack" etc.
so when you hit the "attack" button it checks first if it can
Oh ok! Well I'll see if I can tweak it a bit, it may be just the transitions then
Because it attacks when it can, and moves fine, just the small bugs
Thank you for your advice!
It sounds pathetic but how can I like tidy up my nodes in blueprints, they are way too messy, does anyone know of some good free organisation plugins
-
use reroute nodes
https://docs.unrealengine.com/en-US/ProgrammingAndScripting/Blueprints/BP_HowTo/ConnectingNodes/index.html -
better code logic (make small and reusable code)
Examples of the ways to connect nodes together in Blueprints.
Thanks I will try to use more of those reroute nodes
just curious im trying to add a emote system to my game but im running into a issue with overlapping audio since i spawn a sound in the world attached to the player each time someone does a emote how would i go about fading out everyone else thats doing emotes and only prioritizing the user based on diffrent clients
Is there a way to do sort of inverse primitive collision trace? Trace being blocked if most of it being obstructed by the geometry?
you'd probably need to do several linetraces and see how many of them got blocked or something
@summer bolt I had a similar issue, I ended up making a voice manager component on my player that handles fading out old sounds and fading in new sounds.
oops i mean @weary prism
heyo - does anyone know if its possible to hide master BPs from others. Such as exporting out abstract classes that maintain master functionality but are empty to the end user?
think: modding - allowing access to asset library while restricting access to master classes and their scipting
not sure if this is the right channel to ask this
Yeah, in the Editor.
Distributing a custom dev kit and hoped I could protect a few BP classes from the public
If it’s currently not doable, someone with some expertise here - there’s a plugin idea lol expose some form of BP protection agency
Private classes that are functional but inaccessible to the public and public that are exposed as per the norm.
I wonder if it would be as simple as some sort of graph modification where you could make each of the master class graphs display as blank graphs, and hide all functions from the Functions tab, but allow them to be accessible as callers only
Yeah not simple lol
is there a way to visualize the normals of a procedural mesh i generated?
(as arrows/lines)
Trying to do what I think is probably a simple task; replicate the paper2d flipbook state so that a client's change in direction changes the animation across all clients. Should I be replicating the direction? or the flipbook state? also not entirely sure how to actually play it. Do I use repnotify on those variables? or call a custom event to multicast it in the event graph?
Is there any way to hide all the junk detail categories on character instances in the editor
for some wonderful reason adding things like Tags, Rendering, and many others to the hide categories list doesn't do anything
I cannot use liveLink because I don't own iPhone. Luckily there is this app that makes it possible to send facial mocap data from android device to UE 4 project https://www.youtube.com/watch?v=RTn3qus_V5I anyone can provide some resources or at least any clues how should I go about implementation of feature so that I can use received facial mocap data on metahuman / other custom 3D character
New and free Android "Face Mocap" app to track faces with the phone, im publishing the app in google play, the unreal engine 4 project and the executable (links below).
You can use the app with ue4 to record movement and animation.
App:
https://play.google.com/store/apps/details?id=mx.motion.ar.facemocap
UE4 executable :
http://motion.mx/ue4/An...
Wow, okay for future reference: You can hide useless detail categories by adding the category of the component itself
Example, Character Movement: Flying, is part of character movement, which is under Character
Need some help with landscape displacement :/
I have scoured the whole thing. It ain't there
Is there a way to get the individual rocks to be less flat..? It seems like the displacement isnt really giving me bumpiness off the rocks
Does the heightmap not match the rocks?
I copied my entire content folder into a new project (upgrading BP to CPP project)
Any clue as to why it is causing my character to be shifted upward?
It's very jjagged for some reason, and idk why
Having a small issue with respawner-- it's only letting me respawn once.
WHat am I missing here?
@bitter lance the only thing I can think of is that you are calling Respawn at the end, but your event is called Respawn1
siiick I got the replication to work finally.
Question -- is it bad to put flipbook state determination on Event tick? I had it set to key presses (wasd) and it was causing a lot of weird behavior
@bitter lance i dont think you need 'respawn1' or 'respawn' unless 'respawn' is just to set some variables in your character
How do I know what object to use when casting to a non-Player blueprint?
I know what do use if I’m casting to a player character or player controller but right now I’m trying to casts to and enemy character and I have no idea what object to use and I just keep trying things and nothing is really working
I am quite stumped
Your question might be similar to mine, @trim matrix. I ran into some trouble since yesterday when I am trying to create a power up for the player character, which makes the player shoot slower projectiles. My problem is, that the projectiles aren't an actor that exist in the scene yet, but rather their own blueprint. I am having trouble "communicating" to this blueprint, and tried various different ways of casting to, unfortunately unsuccessfully.
Well with me I actually have my actor placed in the scene but I have no idea how I’m supposed to cast to it without knowing what object I should be using or if I can even cast to my enemy from my player character and I haven’t been able to find any documentation about casting to any blueprint that isn’t for the character/player
I think I might actually be able to help you out, unless I missunderstand. I started 2 days ago, so my knowledge is very limited, but I'll send you a private message.
Would anyone know of a good resource on how first-person games handle interactables in the environment?
Share the BP code
Hello, I'm just trying to learn the engine
How do I get the local location data of a component and put it in there?
to be exact, InnerDoorPiece's component local location
Don’t worry @plush garden helped me figure it out
Drag off from "Inner door piece" and get the location
The split it, put Z into the product and x and y as is
@left niche thanks for answering
Is this the right way?
I'm not getting the value 50 so I don't think it is
If you're opening/closing the door, you need to change its rotation, not the location
I'm following a tutorial that's making a door slide down and up. I finished the tutorial and decide to make some tweak on my own to learn
Oh
The tutorial just simply put a constant value like this but I want the blueprint just take the Z location value of that component
so I don't have to change this value everytime I change the component size
if you use "Add relative" instead of "Set relative" you wont need to get the current location
Is that a right mindset?
yes it makes sense
Although im confused by the product instead of adding Z👀
edit: no it doesnt make sense
I need to save the location Z as a constant value at the start
Yes
To open add Z and subtract the same to close
And how can I do that in blueprint? >:
Store the location during begin play
Hey I am facing an issue while streaming level
So When I Load Stream Level
I am keeping Make Visible After Load false
As I don't want show Map until Player do certain task.
Problem is even after manually changing visibility of map after level is loaded using shouldbevisible bool on level stream object reference
I am not finding Actors in map. GetAllActorsOfClass doesnt return actors on new map
But turning make visible after load to true
GetAllActorsOfClass returns actors correctly.
Is there any other way to Make Map visible?
make a new variable first
@left niche
Thank you very much! I've made it work 🙂
Nice first day of Unreal Engine.
hey folks
i'm building a TP character controller and having fine control over walk speeds in different directions is real important for game feel
is there an easy way to adjust walk speeds in cardinal and ordinal directions?
currently im using a bunch of branches to achieve this but i was wondering if there's a cleaner way
Any Idea how I could use BP to Loop a rotating fan blade to speed up and slow back down every 2 seconds ?
I might use a function of the forward vector angle but idk if that's too far for you
How are you rotating it currently?
@languid lion with AddActorLocalRotation but I cant figure out how to make it speed up and slow down.
I am trying to set it up so that the player has to run through it when it slows down...
hopefully if they misstime it I can make it kill the player character
Has anyone had any success in generating **procedural meshes **at runtime?
I can make it work in the construction script of my actor, but if I link the code to either the "event begin play" or a custom function I created (and call after the game starts), it doesn't work.
@languid lion Talking to you just gave me an Idea XD
I could probably do it using a time line. If I learn to use a time line first XD
I was gonna suggest a timeline since it'll look smoother
You also have this component
You can bump the rate up or down using a function or event that you've set on a timer
You can take a similar approach with AddActorLocalRotation as well
one easy way : get the current time, modulo it by 4, if its <= 1 set the speed to high and if its <=3 set it to low, or vice versa
I will also try that ! tyvm
Just noticed something curious. I have an input/axis event for left and right mouse buttons. With the debug filter on in bp editor I can see that if I just click either button once the axis event execution line permanently stays lit up even after I have released the button. For the most part everything is working as planned although I am troubleshooting something that could potentially be related to this. Anyway, is it normal for an axis event output to stay active?
iirc the axis events always fire
axis event is the same as tick, it gets executed every frame. what you actually need to check is if the axis value is != 0
Yeah everything seems to be working correctly as the only things happening on that execution line are setting float values based on axis. I knew it ran on tick but I just assumed it would "activate" or "deactivate" depending on whether it was pressed or not. The more you know!
that would be input action, not axis event
Thanks I understood the difference in functions between the two but just didn't understand the underlying mechanisms of how tick works with respect to input axis
Up until fairly recently I had been changing booleans based on input pressed and released. I just noticed this for the first time regarding a button press input axis event. I'm curious to kjnow why an axis event for mouselook for example does not stay lit up on the debug filter
Oh wait no, maybe it does. Maybe I'm just going crazy!
Anyone knows how to cast when there is multible players.
This used to work when there was 1 player but not with 2.
https://cdn.discordapp.com/attachments/225448446956404738/824035987855900672/1e5051602d70a8baa9d76daa959abc27.png
I have morph targets that I want to add to a UI slider. I have a morph for the smallest the body part can go and a seperate morph for the largest it can go. How do I join both so that the left of the slider is the Minimum/Smallest value and the right handside is the Largest/Max value on the one slider?
You shouldn't even need to cast if you're feeding into an interface node. The idea is that if your target implements the specific interface, then it'll go ahead an handle it, and it doesn't matter if you feed in a reference of a parent class when you're trying to reach the actual class of the object in question.
help! please! i decided to do a behavour tree task that spawns a widget when e pressed
but apparently it doesnt work
why
(the thing behind it is a dialogue box. its not necessary)
executed ai
(works out as an npc logic controller(npc's brain))
@dawn gazelle Yeah it used to work without the cast but it suddenly stopped working
So when I'm calling a text bind on a editable text box on a widget I try to edit the text in game and it goes back to the text bind number can I make it so the text bind only runs once?
The idea of binding a widget value is so that the displayed value is always updated based on what the bind tells it to set it to. If you want to use a bind, then you must update whatever variables it uses in the bind rather than setting the text within the box directly.
Alternatively, you can remove the bind, then you have to manually update the text box any time the displayed value needs to change.
So would I manually update the text box then
Sorry if that was a dumb question I'm not voof with this text stuff lol
How do I have two morph targets on one UI Slider? Min and Max values
Up to you how you want to handle it. Both of these ways are valid, but you can only use one or the other.
alright so i want to have a variable setting a number
then i want to be able to edit the number
if i use the top one when i try to edit it just reverts
wait
i could change the variable value
im dumb
Hi is there a way to restart packaged game? Quit game and open it again
Hi, I've got a weird issue
I'm checking if the object implements the interface
and it seems to work on the parent class
but not on the child class
well does that hit actor actually have the interface?
if you open its BP and check?
Working on that now, it should be, but I'm gonna debug just to be sure
Interesting... I'm getting the same behaviour.
well 4.26 had a few issues with interfaces in BP
but they should have been fixed in the new version
Does it somehow consider inheritance =/= implement?
Wait... I messed up. It didn't have the interface, and it's not listed as being inherited either.
Meanwhile, it's showing in the interfaces on the left.
Mine's inheriting just fine
and you verified the hit actor is the actor that implements that interface?
XD
Hey folks, how do you guys go about your level order? Splash screens to Persistent, then on persistent to load up main menu?
hello slackers! question - is there a way to set a sub level to be the default one?
i have one level without persistent level but with two sub levels - i want that when one gets to this level, it automatically loads one specific sub level
This quite depends. On our Game, we have one level for the menu, and one level for the game itself. Hence, the sequence is: Loading Screen -> Main Menu -> Loading Screen -> Gameplay
But you can use level streaming to embed multiple levels into one
That said you can have like the Main Menu and the Gameplay level into the same thing, ‘saving’ you from two real loading screens. I’m not sure about memory etc. but you definitely can approach it like that
@winter garnet Aye, thanks for your answer!
Hi, im in the middle of making a grappling hook but once I attach to something I get flung up into the sky. anyone know a fix?
im a beginner to UE4 with like under 5 hours of exp.
You probably don't want to add force on tick, as each frame more and more force gets applied (eg. 60 FPS = force applied 60 times in 1 second).
so what should i do instead? @dawn gazelle
If I want to rotate character to mouse cursor, which function I should use to tell CharMovement component where to rotate?
I'm not sure if this is the right chat, but I'm new to unreal and I'm trying to get the drawers on a filling cabinet to open individually upon command(Once clicked upon) but I've only managed 1 drawer, and my thirdpersoncharacter blueprint is casting to the entire filing cabinet, so it opens upon clicking the cabinet itself and not just the drawer, preventing me from adding multiple drawers to the code.
I have the logic for my slider set so that it knows if the value is > or < 0.5. How do I set it so that IF over 0.5 then X morph target is applied and under 0.5 another morph target is applied? I basically need one slider to manipulate my two morph targets, Small Nose to Big Nose etc...
Update both but just map the values that go to each morph target?
Sorry I'm not sure how to do that 😦
At 0 of the slider, I imagine you want both small nose and big nose to be 0, and you only want big nose to increase once 0.5 is reached.
At 0.5 of the slider, do you want the small nose to be at a value of 1?
At 1 of the slider, do you want the big nose to be at a value of 1?
@dawn gazelle Currently as default the slider is set to 0.5 as it is in the middle. I was hoping that as the slider goes to the left the nose becomes smaller and if it goes to the right the nose becomes bigger
At slider value 0, what value do you want Nose Small and Nose Large to be?
At slider value 0.5 what value do you want them to be?
At slider value 1, what value do you want them to be?
@dawn gazelle 0 would be Nose as small as possible. 0.5 would be neutral and what the base character is. 1 would be the Nose as large as possible.
You're not answering the questions. I do not know how the morphs are set up at all. I need to know what value you want the morph targets to be at the particular ranges. For example "Nose Small" could be smallest at a value of 0 or smallest at a value of 1.
@dawn gazelle Sorry, Nose small is smallest at value 1 on the morph target value Nose large is largest on value 1 on the morph target value
Ok that I can work with 😛
For my filing cabinet I figured out how to get the individual drawers to work, but since they start at different locations, some are not opening and closing at the right distances, is there a way to reset an an objects location to zero in a blueprint?
I am assuming they are static mesh components, can you just set relativelocation to 0,0,0?
Just hook up the outputs to wherever you're applying the morph targets.
Slider 0 = Small 1, Big 0
Slider 0.5 = Small 0, Big 0
Slider 1 = Small 0, Big 1
@lime ridge as in a node for (set relative location)? and throw it in connecting it to each drawer? Sorry Im new to this.
Yes, there is a SetRelativeLocation node and then you can connect all of your drawers to the target
I created a walking attack and it's fixed!
That sure does look helpful, Thankyou! I will play around with this, I am sure I will be back ha, but thanks for that!
thanks @lime ridge
She's moving! Still I do find myself clicking and it takes the state machine to notice my input
@ me if that doesn't work! But this won't move over time. It will just snap closed
how do I fix the occasional delay in response to my input?
@lime ridge can we join a vc im still having issues. If your busy or don't wish to I understand.
Is there a way to get the individual rocks to be less flat..? It seems like the displacement isnt really giving me bumpiness off the rock
Because even when the landscape has alot of vertices, it still gives a jagged displacement and not off the individual rocks as expected
hey guys, does anybody know how to basically make an "event tick" so it runs inside of the viewport (without having to press play or simulate)?
i came across these 2 websites, but it seems im too stupid to implement either of them
I added "animation starter pack" but looks like it has it's own mannequin mesh and skeleton which is the same as default one, how can I apply animations also to default mannequin skeleton? Cause I can't use them
hello ppl! n00b question probably ... don't usually do much BP stuff 😅 how can I have an actor that contains other actors (like childactors) and still be able to access each of the child's public editable vars and events on editor?
@royal zealot you can just add "child actor" component and refer to it
Anybody know how I can make a branch in BPs depending on if I'm in the Preview Window vs any other context?
I'm doing stuff with EQS and want to branch logic in an EQS Context so that it either selects my EQS Testing Pawn if it's in preview but otherwise selects my Player Character
@near glen in functions and scripts yees ... what I mean is
this is the BP that will be used as child, but isolated, directly on the level
this is an actor with said BP as childactor
how can I set it up so that when I click on teh child, in editor, I get access to the same stuff that the child, as a separate actor, has?
Does anyone know what the term is for free building in a game? What I’m looking for is kind of like modular building, but the building pieces can go anywhere.
Ex: I have 2 wood posts and i can drag/nail a plank between them
Hey, is there a way to create a 'Global Macro Library' in Blueprints?
That works for all objects.
Not for macros, no. You can create macro libraries but they are specific to an object class.
You can have global function libraries though.
Gotcha, thanks @dawn gazelle
I can't use function libraries b/c I have several async tasks and I'd like to reuse some of them
Anyone know how I could create a camera change depending on player location in a level?
How do I add a proper patrol movement for an enemy? So far I tried interp (they just pingpong between two points) and using a sphere to find the location of the player. I basically want the enemy to patrol a platform, and if he detects the player he stops patrolling and moves to the player. Anyone know how to do this?
Is there a way to move other components with a simulated physics mesh?
(without attaching them to it)
I have it set up like this
but I don't want the others affected by the rotation of the mesh
I just want them to move with it
keeping their relative location
Hi Datura, I have worked on what you have provided and I have got a bit further however I must have something set up wrong. Can I PM you if you have a minute? If you're busy just let me know :)!
You probably wanna use a behaviour tree for that along with AI perception
ok...well I think i better do some research on that because I have no idea how to even start lol
How do you guys get around loading screens going away on level load?
level stream it
Aye @mystic lantern I set it up so I can, I think I just have to move my character around eh
i believe matthew wadstein on youtube had a level streaming tutorial. i like the idea of having individual levels i turn on and off with a big overall persistent level. so a loading screen level was something i used similar to his
yea i used a loading screen to hide my movement of the character to the most recent spawn point
Yeah, I have that. Just trying to figure out a way to cleverly move my player or camera accordingly hehe
I mean, let's say I want to reset a level, I'd have to take my camera out, then put it back in the level streaming volume right?
OR I guess I could use the level streaming nodes
LoadStreamedLevel or UnloadStreamedLevel
yea thats what i used.
the nodes specifically to load and unload what i needed. i just used triggers to specify where i was doing the loading
Yeah, I might just go that route haha. Thanks for rubber ducking
I think I figured out an alternative to my question mentioned earlier:https://answers.unrealengine.com/questions/1019956/view.html
Instead, I'm checking if the character if facing the direction I want to move. If so, they'll go ahead and move, otherwise, they should correct their rotation first. BUT with what I have at the moment, no rotation is happening.
I know what I'm doing wrong here- because my desired move vector is sometimes 0,0,0, my character always points that direction and if I do happen to get some rotation in, it'll snap back to 0,0,0 once I release the right/left input keys.
I just don't know how to go about fixing it. Any ideas? Here's my code: https://blueprintue.com/blueprint/3k3jbzrq/
I prefer if messages are kept here as others can pipe in and I'm not always looking at Discord, and in case others run into similar situations, at least it is searchable 🙂
@quiet abyss I did that once based on velocity. Allowed turning while standing still and faster turning at lower movement speeds, but full running would require a bit of effort to turn. Is that what you're after, or are you looking to fully lock the turning based on camera view at all times?
@dawn gazelle Fair enough :), my current issue is that I am spawning two sliders. So I currently have two sliders for Nose. One Slider works 0.5 to 0 and makes the Nose smaller and the other slider 0.5 to 1 and makes it bigger. I just need to have that merged into the one slider :)! Any ideas where I am going wrong?
I think this describes pretty well what I'm after but I don't know if it's exact. I'm dealing with a quadruped character so ue4's default movement looks pretty funny. I'm just looking for a way to combine turning and moving so for example- if the character is facing left and you press the right input, the character turns before going forward OR moves forward WHILE turning whereas ue4's default movement will immediately start moving the character directly to the right
I say this because where I've never made a velocity based movement system, I'm not sure if the results of that are what I'm actually looking for
Just use the output from one slider for both, using the two outputs in the example I provided connected to wherever node you're needing the slider value for. Example:
@quiet abyss Ah! Horse movement. Similar mechanic. So it's a bit involved. I assume your WASD movement is based largely on your camera's facing? IE, you always want the movement to go in the camera's direction when pressing W, after the turning considerations of course?
@dawn gazelle Sorry I can't seem to think how to do it as your screenshot shows. This is the way I am controlling the morphs just now
And I am populating two sliders due to this screenshot here. I am aware that I am creating two editor boxes (sliders) but it is the only way I am able to move the slider atm, I dont know how to merge
@quiet abyss What is generally wrong with them?
Here you can see that the last slider I adjust is what I want
@dawn gazelle I have made some adjustments and now getting a weird result. 4 sliders with all different behaviours. One is the exact behaviour I want though!!! The question is how do I repeat it
Hello, I imported a model with 2 different parts in it, the machine, and a lever I would like to interact with. When placing them in a bp they are placed fine however when rotating the lever in the bp, it rotates about the base of the mesh even though in Blender I set the levers origin so where I wanted it to rotate about. What could I do?
Most solutions include rootmotion, which isn't an option as the project has to work with multiplayer networking. Others are simply showcases and don't show any code or include project downloads. Some include tweaking animation so that it closer resembles a correct turn but still ends up very foot-slidey which isn't ideal.
I've seen a few showcases with bipedal characters with the kind of movement I'm after, but no explanation for how it's done.
I think the issue here is that you're using two sets of morph names with no real corellation between the two, and when looping through, you don't have the appropriate order. You may instead want to create a structure that contains two name variables, and then you can create a map of "Feature Name Text" objects to the structure of morph targets. Then you would do something similar to what you already have, looping through them, setting the array element out to the widget creation node, and then finding the element in the map, breaking the structure, and plugging the values into the widget creation node.
This would also require you to reconstruct the "Morph Target List" map I have in my example so that it contains the feature name and the appropriate morph targets.
Example of one such value in the target list.
@dawn gazelle Thanks a million again!! You have been a great help! 🙂 I will get to work on that
@dawn gazelle What would be the Variable Type for that Morph Target List? Name and then what would the map be?
The Map's keys are Name, the values you need to make a custom structure variable type, that contains two name variables.
Just in case I'm not being clear as I know sometimes I may not be XD
@dawn gazelle You are being crystal clear! Its my complete lack of knowledge that is the problem, not you 👍 Thanks, I'll have a play around with this
How are people typically handling npc's finding closets actor of type x etc? Doesnt feel right using GetAllActors of class.. Any tips ?
Examplewise a woodchopper looking for a tree to cut down.
One could use sphere from the woodcutters hut and use that as a basis for range but .. idk
maybe im just overthinking it, and thats a perfectly valid solution
Hey guys!
i'll need help
I'm following this tutorial:https://youtu.be/XhIeEEKcpQ4, and i need to know how to fix the ragdoll
VB Bones list: https://drive.google.com/file/d/1Ya_kDaiq89sCh7FMruLz9gJDPce29P2W/view?usp=sharing
In this video, I will show you how to fix the foot ik bones and add back the character's actions in advanced locomotion system v.4. Also, I put a simple way to fix the ragdoll.
Sounds like its more of a topic for #animation
Yeah i asked here cuz i would get a more generic answer
@quiet abyss It would need a lot more work to feel "Ready to play", but this is the basic idea of that. Only actually allow movement forward or backwards, and rotate towards the camera direction based on the camera's facing direction in the pawn's local space.
Velocity drives the rotation, so it'll only happen while the actor is in forward or backward motion. Turn rate is the -90 to 90 degree clamp, multiplied by delta to keep it framerate independent.
For multiplayer, this could work. You'd just need to handle the rotation on the server as an authority, but also simulate the rotation client side, and onrep it to allow for overwrite that can either outright correct if it's too far, or gently interp it to the correct rotation if it's not too far off so as to not feel jerky.
does anyone know how i might make a suction effect? I want to pull the player towards an area while they still have control of their movement, so moving in the vacum radius would pull them but theyd be able to outrun it
suction is just force in a direction, so I'd think you could use that ?
this is tricky because character movement component tends to enact friction inhibiting any force if you're touching the ground, but yeah you can try to add a force facing the suction event, or add velocity
Could someone tell me how i can fix this error? It only happens for the first frame i guess, because i can move my character. I know it has to do with the controlled pawn variable being empty, but I have no idea what I can do to solve this. I think beginplay is the first thing that's being called right? This is all in the playerController btw.
Trying to recreate Tanarus? 😛
Loved that game.... Racked up a $300 internet bill on my dad's phoneline when you had to pay hourly for internet playing it.
Does anyone have any potential insight into what is happening here? I am getting an empty result where I expect values from a hash variable. UPDATE: fixed by replacing variable and doing the same thing. Some buggy stuff with previous variable in blueprints? No change to data or logic, just deleted and re created the old variable
Ye I know the problems ;). Played so much
But trying to get a 1 v 1 Phoenix duel going on first. So 1 arena, only phoenix missiles and rocket boost. Should be doable, but replication is giving me headaches already
Has anyone had any problems with origins when importing models from blender?
I seem to have fixed it with is valid nodes, but still seems strange that input axis events are getting called before the event beginplay is being called 🙂 But whatever \o/
@prisma stag all the time until I started using the Blender For UE4 plugin, which fixes origins into the object origin point instead of using the world origin
if you're using the regular Blender FBX export option, you need to place the object so that it's at the world origin... but plugins like Blender for UE and the official Blender plugin from Epic can export with the object's own origin so it's much less of a hassle to deal with
50usd if u can help me fix my problem with alsv4. i did not touch a thing
just standerd migrate worked fine then broke all the sudden
getting on my nerves
hey guys all im trying to do is be able to move a square shaped pawn with player input because the Charicter_Bp collision dose not work for me but everything i try the Pawn will not move ive been searching for days on how to fix and i would love some help!
naw its set to 140000.0
you can see im printing the new vector after ive added everything and the number is going up like it should but nooooo movement 😦
its like the Pawn is stuck for somereason
Awesome, I saw that plugin but was one of those things I thought was cool, but would never need to use. I will give that a try, thanks!
Thanks so much! I'll play around with it tomorrow
I see you said Blender for UE4 however there is one called Blender to Unreal that uses Pipeline: Send to Unreal and then you have to install 2 plugins in the editor. Is it the second one?
That's probably the official one from Epic
So it will still keep the origin from Blender? Also, in the preferences on blender for the plugin when you export, it says that it will export to a certain folder on Unreal, would it still work if I export it to a desktop folder?
The Epic plugin should export the object origin yeah... I can't really speak for the other features in it since I haven't used it myself
Well, Ill give it a try and see if it can, if it doesnt work, do you have a link to the one you use?
Awesome thanks.
Hey, I'm sure this is a beginner's question, but I'm looking to raycast out from my mouse's position, and return the location it hits. (As far as I could tell, Line trace by channel returned the object it hits, not exactly what I want.) So far I've got my mouse's XY position, which I can feed into whatever I need to. Does anybody know how to do this?
why in the fuck my dynamic material doesnt change? I can change the value and its ok but then when im interping it in bp nothign happens. print string shows ok.
every other mesh but not this one i want behaves ok
what the fuck
Hit result under cursor
So with yours, the problem Im having is that, even though it does keep the origin, it doesnt keep the location. Is there a fix or is that just something I need to change in the bp?
What do you mean it doesn't keep the location?
When I export as FBX normally through Blender, when I load all the meshes into a bp they all move to their corresponding location from when they were in Blender.
Ahh, right so if you line up your two meshes in blender they all load up nicely in those positions?
Correct.
yeah that's a side effect of the origin being moved.. they load up in the positions based on their origins
so you'll have to manually line them up.. or you can try creating a socket which might be easier since you could snap it directly into it
(the wireframe view from up/down/left/right perspectives is pretty helpful in lining things up in the BP editor)
I will give it a go, thanks a lot for the help.
Not exactly, it's just the all the messages are exported with the origin at 0,0,0. You can't have it both ways, I'm pretty certain you cannot export something with an origin and some sort of a placement offset.
Yea, it kind of sucks, but my model wouldn't work without the origin being where I placed so a little relocating in UE4 inst to much to bother.
If you need both, set things up in blender such that all of your meshes are constrained to empties inside of a base plate mesh. Then export all of the meshes at the origin, including the base plate mesh. If you name your empties right then the base plate mess will have a bunch of sockets that you can snap all your meshes to.
I am building a Master Shader that I use for a bulk of my work that has several gates that limit things like texture samples when they are not needed in an instance (as the example image shows)
The question I have is there any disadvantage to this method? Any hidden costs to performance that is now shown by the statistics in the corner?
so what the fuck is this bull shit
my material is changing because of i change camera?
I don't know, is it? Where are you setting the material at?
its a water material
and when i view target blend to another camera that is not character camera the water goes transparent and sometimes not
i went to the same angles with my player camera and the water dont change
but when i view from the spectator camera set up in the level, the water is gone.
Does it do that when you just move the editor camera around?
no
editor camera and character camera is fine
but when i go in game and it triggers a cutscene for my another camera i get fucked up results
Attaching create dynamic material instance to a timeline update will keep creating it every tick right ?
Bad idea ? Or its fine
Yes, it'll create it every update. Better to create it somewhere before the timeline and save the reference to it if you want it updated.
But it changes the dynamic parameters every time its at certain angle (space planets)
So if i do it before , it wont change
Yeppers
Is that safe as the set scalar running every
Tick
As it would only change maybe one time every 1 minute or so
Is that how long your timeline is?
Because you could add an event track, which you can then specify when that particular output fires.
But event wont run if i set playback position after it (time of day) as its option too
i dont want to get u a headache so i will figure out maybe i should just make two separate meshes instead
fuck lighting, materials and distance fields and what not.
That’s rude
if your material changes only once per minute there's no need in timeline at all
Its based on what position time in timeline
hey guys im having a issue when switching items in my inventory hotbar im trying to figure out how to determin if the selected index is null or empty and if so dont spawn anything in the players hand
i have it setup so you can switch the selected index via num keys like 1 2 3 4 but im confused on how to test if the selected index contains no item
if that's about time of day task I'd better solve it with timer event and int variable which denotes current time
i see nodes for testing if a slot contains a item but not for if it dosent contain a item
depending on what array are you using. is it struct, is it actor array?
I will check about that thanks
@half sail its a struct
so when the item get's to player's hand it got some kind of mesh or icon. you can try to get this info from struct and check if it's valid, if not, there's nothing in hand. or you can add simple bool to your struct like "inHand" and check on validity based on this bool
@half sail i basically test to to see if the item is valid and still in hand if it is valid detach and destroy the item in hand wait 0.5 seconds and spawn the new actor from class and and attach to the players hand if its not valid itll just spawn the actor directly my issue is im trying to determin if the item that the user has selected actually has a item class to put in the users hand if it dosent then detach and destroy and dont do anything
cause if i dont check that the mesh will just destroy itself and spawn another instance of the previous slot when it should just destroy and thats it if there is nothing in the selected slot that there switching too
one thing i have not tried yet is testing to see if the structs item class is null so ill try this and report back
ok so that seemed to work when switching back and fourth between slot 1 and 2 but after switching 3 times back and fourth itll say the actor is deleted in my world outliner but the mesh is still in my hand
i guess the problem here is with delay
lemme test that
nope after 3 times back and fourth switching itll stay there @half sail
it will say its not there in my world outliner but the mesh is still there
hmmmm
nvm fixed it i had a 0.5 delay elsewhere as well
so yeah removing delays seem to fix it when i only put it there to avoid spamming the button and breaking it lol
if you 're using delay you should be sure, that you performing actions on the correct thing. like if you need to destroy actor, set it in a variable before
true but i honestly thought the delay would prevent spamming it causing it to break cause of spam but turns out to be the complete opposite
yeah if you need a check to avoid spamming, just make it before everything else, on the stage of player input
noted
Thank you very much, this looks to be exactly what I need
Hello, I have been using UE4 for a month now and I am creating a rolling ball game. I got all the movement down, WASD to move, space to jump, and Mouse Y to turn a 3D camera around my ball. But here is where I encounter a problem, the WASD controls get inverted when I turn my camera into another direction. So I am trying to rotate the ball (which is a pawn) with my camera. Anyone who knows how to do this?
if i remember correctly it's one of flags in character movement setup. "use controller desired rotation" or "orient rotation to movement"
character movement component
pawn does not have it, you need character blueprint
it'll be more logical then getting camera rotation and giving that rotation to the ball manually but you have this option too
I get you
I see a capsule component, do I delete it and put my ball and camera inside?
nope, capsule is a parent component, is a container of everything else including camera and mesh
Okay
Show how your WASD gets turned into movement
You don't want a capsule for a rolling ball game lol
This is the movement bp
First of all use Add Force, not impulse. Unless you want framerate to dictate your acceleration.
2nd, this function is being called twice per frame (Once per axis). You want to either call it once or call it twice with the forward and sidewards components seperately.
3rd, your direction vector is only ever going to be in world space. What you need to do is to have it be relative to the camera. Instead of multiplying ForwardAxis by X, multiply it by the X projection of the camera's ForwardVector (get Camera's ForwardVector, multiply by 1,1,0, then normalize. RightAxis should be multiplied by Camera's RightVector.
This will work
It's not that much, give me a couple minutes
as will this
as will this
I prefer the 3rd option when vector combining inputs but all 3 are equivelent
Do you understand how the direction is working now tho? Before, you were saying "Move in world X direction based on W/S", when you wanted "Move in Camera X direction based on W/S" etc...
Sorta yes, I am not that advanced in physics and UE4 overall
I forgot what thing is where is says add pin, what is it called?
sequence?
Hi I'm having an issue where in the editor my a hud element is appearing but when i run it on a standalone the hud element isnt appearing
probably you need to set your hud texture to the ui texture group
It's not a sequence
@faint pasture, where a function that says 'Add Pin', I don't know what that is. Could you tell me what is it?
Show it, I have no clue what you're talking about
this is multiply or *
Float * float? that pulled up something similar
yes
What about the one that is connected to Get Right Vector?
vector * vector?
I finished the third option and nothing works
I lost everything that I did, could I go back to another verison before everything got deleted?
This really sucks..
forget about what i said, your message appears only in case of valid cast to player character, if there's no message it means cast fails, don't know why
But is there a way to go back to another autosave in my project?
yea its suppose to work that way
its checking if the player is looking at an object then it will make it visible
but when i package the project and try it out it the widget doesnt appear
it works completely fine in the editor
I am literally trying to get my BP back because I couldn't load in a autosave
hi there , i have no coding experience nor knowledge on programming but i wanted to try out ue4 . anyways i followed a dynamic weather tutorial on youtube and it works pretty well but i want to make the rain randomly activates in the in game time just like a random game event . you know how those open world games sometimes rain just activates randomly , yeah i wanna make that but i dunno how to make it into a random event . should i use a random boolean from stream or random integer or is there another method and how on earth do i make it loop randomly in the in game time
Try Get Game Time in Seconds.
Basically every 15mins or so, make it rain.
You can also do something like generate a random number between -5 & 5, and add that to the 15 mins.
yeah i need some help
that widget appears in the editor but not when packaged
I've check the game mode settings and I've checked to make sure it's added to viewport
is there a way to check within the build for the reason why the Widget isnt showing up?
Begin play, set a weather pattern, choose a next weather pattern, and set a timer with random time.
When the timer fires, set current weather to next weather, and choose another weather pattern, rinse and repeat.
I'm having a very basic problem right now. Get overlapping actors <type Actor> returns nothing but overlap events fire fine immidiately on a newly spawned actor. Any ideas?
The context is spawning a hurting volume for a second ^
I fixed it. Issue was calling get overlap too quickly after spawn...
I'm not sure if this was answered before
But does anyone know of a way to keep relative location of other components on a physics object as it's moved around
without them being affected by its rotation?
You'll have to move them. What are you trying to keep still, a camera?
a collision volume (for overlap checks) and a text render for now
collision volume is fine if just attached to the mesh
text render will later be changed with proper UI
It's basically this right now
(also found another issue around picking it up when standing on it)
Is there a way to reliably check that?
(so you can't pick it up if you're on top of it --- top is relative as it can rotate)
Hello guys. I have some actors spawning under the floor and rising up. It looks like it's not working. I'm assuming because of occlusion culling, because if I change to wireframe the animation it's starting and it's working. If not, the animation is not happening. How can I solve this?