#blueprint
402296 messages Β· Page 723 of 403
so the lerp is constant instead of reducing to infinity
I'd never consider such an approach safe tho
as nothing guarantees you that anything else doesn't use the same variable or function (that has a variable inside) again
very impractical
jst a simple lerp but i wanted to get the variable temporarily because the target arm length value inside the camera spring arm will change while inside the timeline
i thought the same too
too risky but i wanna run it for a while see if it gives me any issues in the long run
and ofc i believe there will be a better way than this but an interesting approach
This would mean that whenever you want to use this "temp" variable, you'd have to make sure its not already in use etc
OR you'd need a new function for every place you'd want a temporary variable
Can anyone make any suggestions how to better manage player states? Currently I'm just using this data struct, but I am not sure how this works with things that could perhaps layer together... such as sitting + idle?
Which then begs the question... why go through the trouble of a function, when it could just be a "temp variable" in the bp itself
@main shell if you want to modify a variable but retain its original value, you just copy it to another variable. You can also use a local variable if it is easier.
yea ofc thanks
fire away
can you identify anything wrong here ? in my 3d widget im able to switch between 1st and 3rd option but the second one is not being spawned when clicked for some reason. can someone help me figure it out?
.
I can't see the issue in the code there, but I feel like there's probably a better way to manage that... Can you triple check all the settings on the widget items themselves?
for some reason its buggy to click use to switch to that specific option idk why
its like i have to clicka round the button for it to be clicked
and it comes up invisible
1 and 3 work fine
the ui is bugging to select the second option
.
I don't think it's a code issue... seems more like maybe the collision is off or something... can you try setting its priority really high and see if it makes any difference?
ok so it seems to switch now
but the widget isnt showing the render target for some reason
any knows?
its spawning the mesh but its not showing on the widget
So I'm doing a sphere overlap actors, I want to filter for 3 separate classes. Is it better to do a single sphere overlap with no class filter, and then cast all of the results to the 3 things i'm looking for? Or 3 separate sphere overlaps, one for each class?
because it removes opacity from the background
it shows here its just not showing in render scene
not sure if there is a render visibility somewere for the widget but i cant findi t
maybe something wrong with the button that is suppost to active the widget and turn off the others?
@fleet cedar
Sorry, I can't really understand your setup at the moment. This might be better put into the UMG channel
Might just be me not knowing enough
Does the 'Table_set_5_mesh' BP exist anywhere in the scene?
Or is it just a BP that you used to create the icon but didn't spawn
the mesh that needs to be spawned in the scene is scynced with the use button. the issue im having isnt that because its working now. when i choose table set 2 from the 3d widget its not displsayed on the widget which is referenced from the render target
this renders out a source target which is added in the widget bp
which is then referenced in here
it shows fine here
but its not showing when i start the game and switch to that option
this is before i start the game
this is after
.
I'm afraid I don't know. One thing you could consider to simplify it is to just flatten the RT out to an image and use that, might help, but you may not want to do that for obvious reasons.
Hopefully somebody else can jump in!
thanks il use an image for todays presentation then. im not sure if anyone can help the issue?
Is it possible to apply the camera shake to the childs of the camera? (like a helmet)
(want to add head bobbing but it looks weird because only the camera moves not the attached mesh)
is there anyone who can help me with my previous query?
How can I get the players animation state machine? I want to disable input while a certain state is active. E.g, disable player input while sitting animation is playing, then enable while sitting idle is playing, so the player can stand back up?
Hi all, I have been looking around for a tutorial to help me out but haven't managed to find one yet. Situation: I have a planet orbiting a sun, when a player lands on the planet they currently slip to the trailing edge of the planet in its orbit. Gravity acts as expected otherwise. End state: I would like a players movement to be relative to the planet rather than world so that the player orbits with the planet without any relative movement. Player would also need to be able to move around the planet as normal relative to the planet itself. Currently I am figuring this will require passing the planets vector and adding that information to the players movement calc each tick, if there is a better and/or less computationally expensive method please let me know, the solution will need to be compatible with multiplayer replication. If anyone can suggest tutorials that show how to achieve this or can tell me how this can be achieved it would be massively appreciated, please feel free to tag me in replies.
hi guys. does anyone know how i can show my debug mouse also in rendered export
There's a couple of free plugin on the marketplace that accomplished this. If you're adverse to using a plugin, then you can at least see how they accomplished it, however, the ones I've seen all use some C++. Search for "Gravity"
can anyone tell me if i can use my mouse debug and make it so i can use it in the export as well. thanks
I currently have gravity and orbit working but not the relative movement, I was looking for a BP implementation method if possible. To be clear if the planets orbit is stopped the player acts as expected it is the planet movement that I am needing to compensate for when standing on the surface of the orbiting planet.
do you know how to fix my issue ?
I do not sorry, I am good at math but just learning unreal 4 sorry
anyone?
@jagged kelp the relative movement can be achieved by applying to the pawn the same displacement as the planet. As long as the pawn is standing on the planet and inside its atmosphere, it will be carried along by it.
So applying this on tick is the best solution?
@jagged kelp that's how I would do it. On Tick the planet updates its position. That results in an offset respect to the previous position. Take that offset and, On Tick, apply it to your pawn.
If you are using the Character Movement Component, it is designed to take into account the movements of the so called "base". If the base it is standing on is the planet, it will move along with it.
I am using a default first person character so it should have the character movement component I would of thought
thank you, I think I saw a moving platform tutorial earlier that did this so I will start there
@manic wigeonI never tried that but, from what I am reading online, widgets appear to be static inside a Sequencer recording. It may be a bug or a non-feature.
Does anyone know how i can find out what number is sent from the random integer? i'm trying to get a boolean to switch on depending on what number comes out
I'm taking a guess here:
Can you promote the random integer value going into the Get node to a variable ?
Store the random value in a variable if you need to use it more than once.
Ahhh that worked! thanks you two π
but i would rather store the result of the array get operation
i'm still very new to blueprints so i appreciate the help on this. Would this setup work to set what comes out of the array for later use or would it be better to just use that variable elsewhere when i get to making what each of these parts do?
You may want to consider using an enumerator rather than several booleans if only one of these booleans can be exclusively true.
Is it possible to attach an actor from persistent level to an actor in another level while level streaming?
ok ill look into that, thanks π
I'd say probably, but the level where the attachment target is must be fully streamed in before it'll work
(since otherwise the attach target might not really exist and thus you wouldn't be able to attach to it)
When you do a Sphere Overlap Actors, is it possible to make your own Enum instead of the default one and hook it up there? (in Object Types)
No - but you can add additional object types within your project settings.
I saw this "channel" term before
it seems like it means something like group of things
blablabla by channel, etc
I will take a look
Is this sort of what you were meaning? i set the enum from the random integer variable and then i can just get my enum and plug it into a switch later on?
Yep. Or use with a Select node as well.
Ahhhh ok thanks heaps π i was trying to figure this out for ages
Is there any Widget that would be equal in functionality to a HTML5 Canvas element or a Java Graphics2D interface?
Or at least similar.
Handle 2d-draw calls instead of displaying a static structure.
what object should i use to cast to widgets?
Not directly but image with material and a rendertarget 2d canvas
Use a Image Widget with a Material instead of texture and you can use a rendertarget to draw onto it
hey guys im developing some rock of ages clone in UE4 for myself, and im confused, how to make the sphere moves with the camera rotation when pressing W even if you watching from the top of the screen? like in Rock of Ages games. For example this is my blueprint for the moving the sphere, im also trying "get control rotation" still the same result, when im watching from the top to the ground, sphere not moving. What method used in Rock of Ages maybe someone knows?
edit: fixed this
Would it be possible to simply assign the material to a surface of a mesh and draw it in world instead?
Yes but
Might look into some rendertarget stuff first
Hello all i was wondering how i would make my food regen my health when the food is full thanks
check on tick if food is full, if it is, increase health
doesn't have to be any more complicated than that :)
ok im not 100% sure on what that means but ill figure it out π
yeah i dont know what to do
My movement isnt relative again, It feels asif it came about randomly
This happend a bit ago and I cant remember what caused it
I was just working on my niagara particles and there overlapping
I made a progress bar and the bar was binded to a function how do i access the function again
In the Designer you can click the magnifying glass to the right of your bound function or in the Graph view you should see it under functions.
Seems like the UCanvas and FCanvas both are quite lacking and cant do much at all...
@worn glacier In the same place panel where the variables are you can drop down functions too find it
Hello, do anyone know why I see that my mesh is hit, but my hit return false?
Let's see your line trace implementation
It goes like this
What actor is it returning ?
Sometimes the good one, others none
(when at the same time you can see the hit getting registered
Are you trying to line trace through the panel and hit an object ?
Sorry I'm just not understanding the picture.
The blocking hit doesn't return just true if it hits. It's referring to if the hit was a blocking hit or not. That's different
That's it
As you can see there's the little square meaning that the hit has encoutered something hit detectable
It was just coming from my method for getting the range of my bullet
(because I'm shooting with a gun)
And I was using the wrong hit for this
Ty for your time !
https://www.unrealengine.com/en-US/blog/collision-filtering
Oh okay lol anyways here's a good thing to read up on as well
Choosing what collides is obviously very important, but it can be tricky, and itβs a problem that we have spent quite a while discussing while developing UE4. The system we have can seem a little complex at first, but it is very powerful and consistent, so I wanted to give a little background on how we arrived at it. Weβll talk about the differe...
Yeah I already saw it in the past for building this system
(but it was just related to a basic mistake, nothing relatable to this)
Can someone please tell me what I need to add/change to make this actor move based on the forward vector? I genuinely cannot figure this out...
actorlocation + forward vector * (your range here)
@silk folio You could. Especially if there are visual and physical components to the checkpoint, making a checkpoint actor is intuitive to me.
Hello, i've made a destructible mesh and i'm breaking it using a hit from the player. It is working fine but i want to send a impact from the opposite direction of the hit location, to look more real, but i just cant get that direction
@glad jay To reverse a direction, just multiply it by -1
but i dont have the direction, just the normal and the location
Actually if I'm understanding you correctly, you should be able to just add the normal to the hit location. Maybe after multiplying the normal just a bit. Uncertain.
@tight schooner would u know by any chance how to assign a checkpoint to one player only ? All would be the same distance away but each player would have their own
i have tried that, it does nothing
because the normal is most zeros
The normal will always be a pointing vector of 1 length. So in this case if you hit something, and add the hit normal to the hit location, you'll end up with a vector that is 1cm away from the hit location in the direction away from the hit object.
If you multiply the normal by 25 first, then add it to the hit location. you'll end up with a point that is 25cm away from the hit point away from the hit object.
@silk folio not offhand...I'm not well versed in #multiplayer but it would involve doing stuff on the client level rather than the server level potentially. Or the server needs to differentiate players and give them different checkpoint locations. Idk.
Okay I appreciate it @tight schooner
hey guys
I need help with 1 thing
I have a widget and when I enter box collision it shows another widget and I wonder how to hide both of them using 'E' key
thanks for help
one of the widgets since the start of the game
and one only on collision with box collision in blueprint
and I want on collision and 'E' key to hide both widgets
Hi, any idea on why "Move To location" may not be working?
i created a basic ai controller, a basic character that inherites from "character" and i'm calling a function within the character to "simple move to location"
the function gets called, but the character does not move at all
how do i make my character play an anim montage?
"Play Anim Montage" node
Hey, quick question here:
For a shooting system for my project, which is better, using projectiles or line tracing?
My project is a singleplayer VR game targeting Oculus Quest, so performance is a high priority, and the gun designs will be bolt-action/semi-automatic guns, and shotguns
This depends 100% on what type of shooting you want. If you want weapons that hit instantly in a straight line, linetraces are the way to go, but if you want something that takes a bit of time to hit its target and perhaps has bullet drop or such, projectiles work better
But projectiles are heavier to use(performance-wise) compared to line traces, right?
Slightly, but I don't know if it's really enough to be a concern. Games like PUBG Mobile and Fortnite both use projectile based weapons
Anyway to place struct and regular variables under the same category? So I have struct and non-struct variable with AI category name. They appear under AI name but in diff places.
only for the sniper and rocket launcher in fortnite
and grenade launcher
@wind sequoia Ah yeah less familiar with that, PUBG definitely uses them for all :)
All variables with the same category should appear grouped together
regardless of their type
π€
Are you sure you don't have any extra spaces or anything in the category names
The first ones using regular variables and second one using a struct.
I see, then I think I might go for projectiles if even the Oculus Quest doesn't take a noticeable hit in performance by it
Thanks for the input!
Easiest way to find out is to just do a quick prototype implementation of the shooting and see how much you can spam it :)
i tried that. id doesn't play it.
Yea I had spaces before and after "|". Thanks
Is there a way to put the regular ones before struct? if It follows order of placement...
It should go in the order you have the variables in, so if you reorder the variables in your BP they should go into a different order in the panel too
My structs are always appearing before the regular ones. I placed the struct ones at the bottom.
Weird, they really shouldn't be special in any way, it's just another datatype. Have you tried restarting the editor? It's possible it might not be reordering them for some reason until a restart
Hello guy,am new to ue4, and I am trying to make a 3rd person movement system where the player is only allowed to move in a circle with a centre point and radius which can be change in real time.I got this Blueprint script online but it doesn't work right. The centre point must be static and the radius is not editable.can anyone help me with this. Thanks
Hello guys,
I have problem with my loop, i dont know why but, when I plug the Β«inventory, number of slot and - Β» Unreal spawn error, I don't understand why this part have an error.
So if you have little time, youre help will be appreciated !
Both. I do projectiles as stepwise line traces. I suppose so does the projectile movement component. It just does a shape sweep instead of a line trace.
would event tick based sprinting would allow users to sprint for different durations based on game fps?
If you're doing a sprint and are using the CMC and not doing sprint in the "correct" CMC way then it'll be all sorts of screwed up. Won't really allow cheating tho. What do you mean by tick based sprinting? That doesn't make any sense.
if u decrement your stamaina with event ticks
its ok tho im using a timer by function
that seems to work well
Hello, I have a blueprint that whenever i open crashes the entire engine and won't open again, at the time of first this happening was changing a variable from one type into another type when it crashed.. can anyone please help with this I've been looking everywhere
is there a section for crashes only ?
there's an autosave directory in your project, maybe you can grab an working version of the blueprint from there
How can I do a line trace from muzzle to center of the screen?
I can do that using two line traces but not using only one.
Line trace from camera to a point, then trace from muzzle to that point
that' two line traces right
Can't do it with just one. How would you know what depth to trace to
right
You can just do a baked in offset, depending. How drastic is the angle difference? Show a screenshot of your view
Beside that, So I'm trying to create auto AR47 using line trace. So I have a timer that keeps looping. But it's not smooth.
I'm using ALSv4 c++ version
I mean show an actual screenshot
It'll all depend on how far the camera is from the gun direction
screenshot of blueprint or gameplay
Gameplay
Is there anyway to convert weapon data from wikipedia into UE4 spec such as range, speed, etc?
I think you'd have to do projectiles rather than a line trace for that
since a line trace will be instant
So you can create delay or curve the line using line trace.
@true valve ya you'll need the 2 traces. Welcome to 3rd person shooting
Using line trace you can penetrate walls that one benefit.
No not really
I guess I've to use projectile then
So many ppl use line traces. What about AAA games?
depends on the game i guess
What makes you think you need a projectile?
There's really no difference. The default projectile component uses shape sweeping but it's all the same. I use line traces to do a ballistic path so at fast enough bullet velocities it effectively becomes a single line trace.
projectiles have issues too from what i know
e.g. they can be so fast that they just go through stuff without colliding
Ya I much prefer my method. Basically doing a trace per frame instead of a sweep/shape collision test per frame.
could also do a sphere trace to see if anything would move into the path of the bullet
but meh, just do line trace and call it a day
no one will notice the difference π
Ya fr I've never used a game where I worried about the thickness of the bullet
Sniper rifle don't shoot straight at far away.
What's that got to do when the anything? Your method of bullet sim has zero to do with your problem, which is the fact that your shots aren't aiming where you want them to.
I got that working using two line traces. But discussing diff topic.
anyway to make UE detect any gamepad input without needing a thirdparty like DS4? (ex. DualSense)
hi
what is the best way to lock character rotation/forward vector into something?
im currently have a lock on system, i have done making the controller rotation looking at an locked on enemy
now i want the character rotation also look at that so it will work with my diagonal blendspace
i tried SetActorRotation during tick event but i feel this might be a bad implementation
any idea guys?
why does that feel bad
@signal warren If your concern is about using Tick, then you need to get rid of that ideology. Tick is not bad. If you need something to happen constantly or smoothly over time, it has to be done per frame. Build your game. If it works, go with it. If you run into performance problems, solve them then. This is both productive, and good for learning.
^Yeah it definitely has it's uses. Locking sounds reasonable to do on tick (as its movement related so it needs to be as smooth as possible)
The "Deactivate Reverb Effect" node doesn't seem to work at all. Anyone got any clue as to why?
@scenic belfry Use the Job Board for this please. Unpaid can be posted there too.
can anyone explain why my scenematic isnt playing exactly when the level starts even though its set first priority in begin play
Hey guys, sorry to bother you, I need help for a bit of code
So I am making an arena shooter in UE5 and got to work on a simple door that opens by rotating 90Β° when a player enters the box collision, stays open for 5 seconds and then closes by rotating 90Β° in the opposite direction
I wrote the code myself (took me 2 hours) and I used two timelines for the opening and closing sequence, and here's the fact, the timelines seem to act in a pretty randomic way, I set the angle to 90 degrees but each time they rotate the angle is either slightly greater or smaller, and this happens in a randomic way, so slight mathematical adjustments in the blueprints section won't work well
I tried looking at a simple door tutorial made by Epic Games in their documentation, followed the steps and the result was all but decent (lol)
I'll send you a photo of the code and of the door when it's shut, when it's open and then closed (in 2 different simulations) to let you see
Here's how the door should be when it closes
Here's when it's open (not perfect 90 degrees)
How come two timelines
Open in the second simulation (even more imprecise)
Cause the reverse input won't work :/
And here's when it closes
..
In the timeline, make a graph for alpha
0 to 1 over time period
Then that alpha (float) will be an output on the timeline
Which you then use to lerp between tart and end position of the door(s)
Updating (tick) with an arbitrary 27 degrees seem weird not knowing how many ticks that could be (frames)
It's a division, in the first simulation I set the angle to 10 degrees and it opened by 270 degrees
Thanks a lot, I'll try and tell you
Guess i read it to fast, my mistake
Don't worry, I writa a lot
Another thing is that the updating (tick) from one door triggers (and re-triggers) the start of the second door
Probably not wanted
If you want the doors to open 'differently' -> asymetric you add two float graphs , alpha door 1 and alpha door 2 :)
Anyone know why play anim montage doesnβt work?
I have it so when the player colides with this collision object, the level variable sets to 2. it does this fine but when I go to my widget object I am setting the variable to what I think is 2 on an event tick but it seems to stay at 1.
Ur setting it to its own value.. meaning, not doing anything.
Also, doing it on tick is not what you should do :p
does anyone know why the overlapping node only returns an array of generic actors? Can it be changed or do I have to create an array myself by casting every array element to a new one after the fact?
Hello i am having an issue where my ComboBox's OnSelectionChanged even its working
I open the drop down for the combobox then select an option receiving no print msg, anyone thing that they are able to help me out? Im new to unreal, using only unity until now. this is UE4
You need to cast it manually
just do a foreach loop and filter with your own array
hey guys. I'm coming from unity and I wonder what's the equivalent of Coroutines in unreal?
something like a delay
Delay
I just tested it and it worked fine
the selection has to be different
yes. I would recommend googling your questions first, they tend to be the first hit π
yeah you're right sorry. I'm just afraid because I just switched.
Hello, I'm new to unreal. I'm trying to do a trace from my character straight forward for some length. I get in to a problem where the trace goes in different directions depending on where the character is positioned. I tried reading up on it in the forums, I must miss something because i don't get it to work.
ok I have another question that I can't find an answer. Let's say I have a game object on my scene(I think in unreal you call that a pawn or an actor?) how can I disable it or enable it via blueprint?
why do you want to disable it? You can "activate" or "deactivate" but it won't do much good. What's the context?
why a sphere trace?
why not? π
@burnt dew try this
I have a room with a desk. The first time you enter it there's nothing inside but when you go outside and trigger something then when you enter the room again the furniture appears.
you are multiplying vectors, not adding them
Use scale 0 to 1 tricks
which are?
in game design, scale objects to 0 when not needed and scale them to 1 when needed
Thanks! omg i missed that it was a multiply.. the text add just made me not think about it was a multiplier
sorry for my silly question but do you know anything about unity?
there's a tick box on the inspector that let's you enable/disable a game object
is the scale 0 to 1 thing the same?
No. Unity actually disables the whole thing from any processing
not quite and this is more a design method
Scaling just changes the scale of the object for rendering and collisions and such
That's what I want to do though
how can I do it?
Depends on what kind of processing you're doing
And which of it you want to turn off
If you're ticking, you can turn off ticking to stop that, but other functionality depends entirely on how it's implemented
I'm not really following
I want to completely disable the game object
and then enable it
Yeah so like I said it depends on what it does
If it collides and you don't want it to collide, turn off collisions
If it moves and you don't want it to move, add some flag to it that stops it from moving and turn it on
Guys, sorry to bother you again, but this timeline stuff is really driving me crazy and nothing I tried solved it
If you don't want it to be visible, make it hidden
Unfortunately no
np
I set up a simpla timeline for the door rotation, so it opens a bit, stays open, and then comes back by the exact same value, but the timeline apparently likes to make the door rotate slightly more or less (randomly) than required everytime it opens and closes, I tired many things, even tried an Epic Games tutorial and got advice from this group, but the problem stood the same
Show the BP you got, I have a hunch what the problem might be
This is the timeline, how do I make it move EXACTLY of the value I want?
Here's the blueprints
Yeah so as I thought, the problem's in the add rotation part
because it's adding rotation based on where it's in the timeline, it adds different amounts of rotation
so the total rotation it adds can be inconsistent between movements
Oh
the way to make it work is to not use add rotation, but just set the rotation to a specific value based on the lerp
so you set A to be your closed rotation, and B to be your max open rotation
Set rotation, I'll try it
then your timeline moves the alpha value between those two, and you just set the rotation to that exact value that comes out of the lerp node
Ok, thanks a lot, I'll try
What node should I use? Set actor rotation, local or world rotation?
try whichever one works best for your needs
Ok, thanks
Local would allow it to work unrelated to its world rotation i think
hey guys can you help me ? i for somereason cant render sequence from my cinematics done in unreal engine. it is instantly telling me exported without rendering the scene. when i open the rendered sequence it is just saying 0 seconds and stops
so im wondering why when i try to select a reference in blueprint it goes back to none?
@blazing parrot check the folder of the asset you want to reference. If the name it's too large or has spaces or strange characters you can't reference it.
Do youhave a task that resets it maybe? Or is this while not playtesting ?
You see the reference from the level? When i select it, the refernece still says "none"
As far as im know, it looks like a blueprint/behavior tree bug
i even have the appropriate specifiers on my uproperty
because you cant set runtime references in the editor
you have to set them on runtime
yup, ive seen that with a blueprint actor referencing something from within the level. i kind of had that figured out lol. so is there a alternative. i have no clue how to hard referecnce lol
with a hard reference. it only works for me with classes or assets lol. every other attempt says the cdo cant find it
the problem is that the reference to an actor on the map changes each time you start the game, so there's no way to set them in editor, so you have to figure out a way to do it on runtime
one way is to get all actors of class, and pick the one you want and store it within the variable (however, if multiple actors of the same class exist, this won't be predictable unless you implement further checks)
yeah thats a good idea. thanks bruh
This is not accurate i think. I can easily set object instance references in the editor? Or is there a specific runtime reference aswell? As with BT?
wasn't aware of that
Hey, in terms of performance does it matter if i put a call to GetPlayerCharacter multiple times for each input instead of just having it once and then connecting it to all target pins?
if you aren't saving it as a variable, but are instead using reroute nodes: those are the same code (these days, reroute nodes used to cost perf)
What i wanted was to call the GetPlayerCharacter node multiple times to each input like this so i dont have to use reroute nodes purely because of how messy it looks if they all connect into one lol but if this costs me performance rather than just having it a bit messy ill i'd rather not trade performance
No difference, but not routing spaghetti all over the place is much more readable.
Thats exactly what i wanted to hear lol thanks
Why would you do that and not just get self? Where are you handling this input?
In the Player Controller
Player Controller has a ref to its own pawn but you should be doing this in the Character most likely.
You can cast the PossessedPawn to YourCustomCharacter and save it on possess, so you can just do
Get MyCustomCharacter -> DoCharacterStuff
Can anyone here teach me how to make a 2D automatic turret like the ones from Bloons Tower Defense series?
The game im making its gonna be completely multiplayer, the Network Compendium im reading through says that input that should work with all characters should be in a player controller (https://cedric-neukirchen.net/Downloads/Compendium/UE4_Network_Compendium_by_Cedric_eXi_Neukirchen.pdf Page 41)
You'll have a better time putting it in your pawns
I usually just put input that needs to NOT depend on the pawn in the PlayerController. Typically, just the pause button
That's pretty much a 2 part question. You need to make 2 bits of functionality.
- Continuously aim at AimPosition
- Detect targets and update AimPosition
Can also formulate it in terms of direction, depends on what you want to do
So how would I be able to reference a target in the blueprint (so the turret knows what it is aiming at) and what blueprint component could do that?
I tried following this one guide but it is several years old and it mentions "set multi comp rotation", which I tried finding it but it doesn't exist any more (maybe because its deprecated?)
Screw guides, just start simple and build it up. Start with getting a yaw from 2 points (turret location, target location)
Rotation from XVector is your key
X is considered "Forward"
Interesting.. thanks ill look into the player controller a bit more so i can understand what its actually used for in cases like the game im making
what values do i put in there exactly because a target location is always going to be changing?
Not the case with turret location, its predetermined on the map that i got but i dont know if im going to be filling out all these values
Okay that makes sense, so general movement and stuff should be handled by the character as well as interaction with objects and thing like that too? Is the Player Controller where i should handle widgets as well because isn't everything thats called in the Character class called on the server?
TargetActor -> GetLocation
Self -> GetLocation
Set TargetActor however you want, probably by OnOverlap of a trigger volume, or a more sophisticated selection function
How I like to divide it up is to think about what an AI should be able to do vs not. An AI is not gonna open the settings menu or pause the game, but it will be jumping and interacting with a button.
you could also say that the CHARACTER is jumping and shooting the gun, but the PLAYER is pausing and opening menus and chatting to their friends.
The way I see it, Player Controller in multiplayer is your only means of communicating with only one specific player. Any other actor or state you could use could have data replicated to other clients, and RPCs will trigger on other clients as well.
did you check out notifystates?
@trim matrix @faint pasture @dawn gazelle Thanks, thats making much more sense to me now, appreciate the help
Well you'd have a window for the input buffering (combo activation), and a cleaner transition into the combo (if input was found), so the attack can start as soon as you want it to i suppose
The combo is refered to as "jump section" in the ActionRPG sample project made by epic,
i'd suggest checking that out for inspiration really
yeah
It can be a bit twisted to wrap your head around it at first glance,
but the more i've looked at it, the better it feels
atleast thats how I see it π
starting on the anim states next week or so
Not that hard really , I think you'll be fine !
So currently i'm using states for dodgerolls, and weapon attacks
Yes exactly,
it gives you a "start", "during", and "end"
So the weapon attack just uses the "Start" and "end" part
Current iteration looks like this
This is an attack, in a combo system
i haven't set up the combo system completely yet, because i've had some design changes after i started on it (or atleast the idea of changes to be made)
the "combo" part looks mostly like this tho
So during combo period, a NotifyState is set in the player pawn
Then if the correct combo is entered, it can translate to the next jump section (an array of jump sections is inside this notify state)
It will play next during "combo End", which will check if there's a valid jump section (combo)
Again, current iteration
so JumpSection is when the player can input a combo move
NS_Weapon_attack is when the weapon actually checks for collision (activates a linetrace for now, might change it later)
ComboEnd is the event which will trigger the next combo, if valid
Exactly
i havnt done this part yet, but something along these lines
misleading name for the event btw
but thats the idea atleast
Sure, that could be done
but state + tick feels like a smoother solution
altho it is still subject to change. I'll have to playtest it once it reaches a testing stage to see what feels right, and if there's really any difference etc etc
^ true, it has a tiny cost,
but linetraces (atleast regular ones) are very cheap
plus it's one of the important things, which may be worth the extra cost
making sure the player hits the right stuff at the right time
That's just my 2 cents tho ^^
does anyone know what kind of variable is this?
im trying to add but "list" or "array" doesn't seem to hit anything, am just throwing words out here
They wouldn't. You first select the variable type, then you can change it to an array, map or set by clicking on the little dash beside the variable type.
oh okay thank you so much.
Not sure its an SM array tho, but reference array ?
maybe, i wanted to it connect to this
but i dont know what this is called either
i just right click , type "add" and hope for the best
doesn't look quite right does it
That is an array add node.
that;s a map
Ignoring the color here... These symbols represent variable storage types in descending order:
Single Standard Variable
Array
Set
Map
thank you. it looks like the tutorial im following now. (so bad, it doesn't explain these things for me as im a literal beginner at UE)
If you have the thing you want to add, you can reverse create the variable
Disconnect the array from the add node ,
Connect the inpit reference
Right click the grey array symbol, and promote to variable
Something along those lines
Listviewobject?
yes? i dont know
Seems like ur trying to save a listviewobject as an object in an array..
Maybe you have lost some asset. Cast To Object node was probably cast to something else, but that asset is lost or failed to load so it turned in to Cast To Object
but i never lost any in the first place because i am trying to follow a tutorial bit by bit
and it doesn't explain to me this bit, while the screen just shows the completed results
was this bit working before?
No, and im not even sure if im doing things in the right order
this is the link that i am trying to follow https://www.youtube.com/watch?v=kw5ak4iOGFQ
FIrst read the comments, because there's a very important message for everyone.
If you liked this tutorial hit the thumbs up button and subscribe if you want to see more of my vids. If you have any questions tell me in the comments.
Facebook page: https://www.facebook.com/AlenLoeb/?ref=aymt_homepage_panel
Music:
-------------------------------...
Oh ok
https://youtu.be/kw5ak4iOGFQ?t=259 timestamped
FIrst read the comments, because there's a very important message for everyone.
If you liked this tutorial hit the thumbs up button and subscribe if you want to see more of my vids. If you have any questions tell me in the comments.
Facebook page: https://www.facebook.com/AlenLoeb/?ref=aymt_homepage_panel
Music:
-------------------------------...
thats the solution that the guy on YT did. And im having a hard time how to adapt it to what i got
because i have a point on the map where the enemy constantly spawns
and i dont know how to reference this in the tower's AI blueprint
then have it track and point and fire at the enemy
its just a ball
I was wondering what would be the best approach if you want your player to get demage if he is in dark place/shadow who is more than 90% darkness ? I was thinking demage volumes, but is there a better approach maybe ?
Sweet. How about triggering next section/montage earlier? With event notify i suppose
Hi! is there any way to check if "ActorOnClicked" is Left or Right mouse click?
Alright so I'm having a sort of odd behavior here with UE4's drag and drop functionality. I am able to drag and drop the widgets, and "swap" them... However once I do the swap OnMouseButtonDown is no longer triggered ever again.
Anyone got any sort of idea why this event refuses to trigger again after OnDrop finishes?
Which actors are persistent across map changes? Is there a list of this somewhere? The ones I'm wondering about are: PlayerController, PlayerState, GameInstance, GameMode, GameState, PlayerPawn
Nothing except GameInstance persists
PlayerController and PlayerState get trashed too?
Yes
Nope
So I would just need to handle that kind of logic via GameInstance
Yeah, if it's singleplayer it should be pretty straightforward, for MP a bit more involved but still not too bad
Yep, this is multiplayer
I suppose even still, if I've got a big persistent world with sublevel streaming all these other things would stay active too
(If I want to support no-load-screen loads)
This has been helpful, thank you @earnest tangle !
np
I need some help.... I have 2 vector3s. I have a vector A, I tracing a line out from my player, and the hit location is my vector B. I am then tracing a line between vector A and B, but I want that line to move out PAST point B in the direction the line is headed. what is the math required to get a point say, 10 units further in that direction?
hit point:
But I need it to go farther out
Get the forward vector again of the vector A * 10, and add that to your hit point.
I think that would do it.
The problem is I dont have any rotation data from my vector A, do I? wouldnt that just be straight forward, and not in the direction of my vector B?
The way I interpreted your drawing was that you're doing a line trace from Vector A, no?
If this is your vector A graph, then you can calculate the forward vector:
Hi guys, im learning blueprints to do some vr experiences (not thinking about being a professional, mostly for fun and maybe to do some simple interactions for a future project). I have a question that should be easy i believe for more experienced users: I made a small very simple bowling game. It works great. I added a button on the oculus touch so that after launching the ball , the player can just reset the ball position to try again or throw another pin to the ground. My problem is: When i launch the ball, it she is still moving when i press the reset button, the ball appears as expected at the beginning place, but still moving. I want to stop the ball every time the reset button is pressed. It should be easy, but cant get it and found no help in google. π π Any help? Thanks.
Those nodes worked perfectly, thank you so much! heres what I ended up doing
Guessing the movement is just done VIA physics simulation?
yes
Very basic, but before resetting, disable physics simulation. After it's reset, enable it again. Might even be better to disable it until you need it to move - if it's in your hand for example, you may want to disable it until you throw it.
Wowww. Thats great, going to try it just now! Thanks a lot...just starting out, and from a complete different background from programming, altough im confortable with unreal but use it more for some cinematics. π Thanks a lot for your help.
Perfect. Works great!!!! π Just tried it.
I have it so when the player colides with this collision object, the level variable sets to 2. it does this fine but when I go to my widget object I am setting the variable to what I think is 2 on an event tick but it seems to stay at 1.
@hybrid rapids
Normalize b- a, that is your direction. If you want to hit a point 100 beyond b, just go to the point B plus 100 times Direction
does anyone know why my set relative location is still occuring even when its not executed
its when i run my game my weapon drops to its lowest point
You are setting the "level" variable within a BP called "Collision".
it shouldnt even move at all
Here you're referencing the "level" variable from a BP called "2dSideScrollerCharacter" in which you appear to be setting the value to its self before referencing it again.
i dont get how connecting that branch affects the location at all especially because either way its not executing
im really confused, what am i supposed to do?
Set and use the variable from one place, right now it looks like you're storing it in two places.
Hi! i'm trying to do a X-Y coordinates.
The idea is to spawn a building, check the bounds and update those value on 2 maps (FLOAT(X):BOOLEAN(TAKEN)) (FLOAT(Y):BOOLEAN(TAKEN))
does anyone have a more eficient way of doing it? the idea is to get a list of positions "taken" that i can move to a string
@runic parrot 2D integer vector to Boolean
You need to round your position, have the concept of a grid. Otherwise you'll end up with someone placing a building at 0.99999 when there is already a building at 1.0
In fact I would just do 2D vector to building struck or building actor. So you know if the space is occupied and what is there
Man this voice to text really doesn't know anything about programming LOL
yeah, i'm snapping the placement position to a grid, i'm gonna check with 2d int vector to bool, thanks
i'm kinda struggling on knowing how much the building is "taking" when placed
This sounds kinda dumb imo
Do a box trace of equal dimension to buildinf bounds and check if it hits
i already have something like that checking on overlapping actors, but i need something that can be translated to text
Ok how abour this.
Make an array of 2d coordinates and when you place do a foreach and check if it is there. If true return whatever
Way easier to manage
yeah, that part is okey i think.
I'm trying to figurate out the best way to know wich coordinates is going to ocupy a building, since the dimension may change (on a snapped size of course)
For the building? Are they meshes or actors?
actor with static mesh
maybe take all the corners of the building (3, 4, 5, or whatever) and do some math to check if point is within the extension of those coordinates
i need the updated variable in another blueprint
I am trying to make main player boat. i have the controls working how i want using physics, but now i cannot figure out how to prevent the camera on a spring arm to not rotate with the boat in a specific axis. if i have a scene node as the root, then the AddForce just moved the boat geo and not the scene so things dont work right. any suggestions?
Im trying to make a turret track a single class of enemies. Anyone know why this happens?
probably because get all actors of class isnt connected in your chain
Right (I wouldn't know honestly, my first time doing this ever) so am I using something wrong when im supposed to be using something else or what
i mean you need to connect it like this as a simple example
the node that gets all actors of class isnt working because its not being run in your bp
the error is because its getting a null array
Like this?
Im not sure if this solution works, because this is what the guide is showing me.
Get location of both sphere item and actors
what guide are you using?
In this series I show you how to set up an Enemy A.I. Turret.
In this series I show you how to set up an Enemy A.I. Turret.
timestamped
anyone know how to prevent spring arm from rotating as i move the character?
@dusky olive so then you would connect the out of the get all actors to set world rotation or whatever the next node is. though using on begin play it will only do it once you may want to use tick like the guide and not begin play like my example of how to get the node to work.
like this?
@echo wren
I have my setting like this for 3rd person, not sure if it is good tho since I'm also new
hey, thanks for the reply. i am not using a movement component, so i dont have those options to help my solution. otherwise you are correct :).
In my firing solution this occurs. What am i missing / doing wrong?
I need to make a socket as well but i dont see it anywhere in the windows tab
The SpawnTransform pin on the SpawnActor node is required
You can't leave it empty/disconnected
Sockets are created on the mesh in the mesh editor window. Or rather in the skeleton when using skeletal meshes
So this is what i have
I just made a socket as well, someone shown me
It compiles with no errors but this also happens
Is "Sphere" your weapon mesh?
Yes. I have a socket just above the "Sphere", where the projectiles would spawn (its also a sphere)
Okay
The error us unrelated to that. You are trying to access a pointer that is invalid
The error points you to where that is happening
But what I got so far for the firing logic is correct?
yes if the socket exists
It doesn't fire, nor does it track properly
It does rotate, but it doesn't update itself
you fr πΏ
ill get the full bp up
Thats the tower
And what do you mean by "begin play" doing nothing
well that explains why you are getting those errors
you have to call getAllActorsOfClass from the updateRotation event
otherwise the get after it will throw errors, like it does for you
Like this?
That one at the top was meant for firing the weapon after interval / update
no
select all nodes and press CTRL + C, then paste them here with CTRL + V https://blueprintue.com/
ok, i think that wasn't a good solution, thought i could edit that BP online
anyways, delete the beginplay node, and remove the connection from update rotation to get all actors
then connect the RED event UpdateRotation to the get all actors
and the execution output of get all actors to set world rotation
that should at least fix the error spamming and the rotation
Do i make a duplicate or disconnect the one at the right side of blueprint
you use the existing one
From here
to here?
Okay how is this
Error is still called, but the turret did track the enemy...initially
I will do another run to confirm
you should also add a check if there are any enemies found by the getallactorsofclass node
e.g. check if the length of the array is > 0 after the node
Ok so before that, the enemy spawning AI was set at an interval of 0.5 seconds so it was spawning very fast
the turret was being jiggy with it when tracking
I set the interval to 10 seconds so there are less enemy spawned over time. The turret does track properly and resets when the enemy despawns (get to the other side of map)
But errors still pops up as above
is there an enemy on the map when the error pops up?
well whatever, the reference is invalid
but uh i tried doing what you said
Branch node - true is connected to SetWorldRotation
There are no errors this time
Before it didn't work - then it did work but errors occurred
now it works and no errors
Well on to firing logic. Is there anything i should be doing to the projectiles before i try adding the logic for it
set the collision handling to ignore collision and always spawn
maybe it's colliding with your actor and wont spawn
in the spawn actor node
One big thing, idk if that was said, is to NOT use GetAllActorsOfClass if possible
You are currently using it on Tick
Which is basically the worst you can do
There are multiple ways to gather Actors without doing this
-
Your Turret, if it has a maximum range, could have an OverlapSphere, which on BeginOverlap adds to an Array, and on EndOverlap removes from an array. Like this you could keep track of the enemies that are in range. Then you'd have an array that only changes when there is really someone in range.
-
If you really need all enemies, then you could make a Component with such an array and add that to your GameState. Enemies could then, in BeginPlay, add themselves to that array by getting the GameState and the component from it.
Then your turret can get the array the same way and you don't need to constantly call GetAllActorsOfClass.
I have it so when the player colides with this collision object, the level variable sets to 2. it does this fine but when I go to my widget object I am setting the variable to what I think is 2 on an event tick but it seems to stay at 1.
anyone got a tip on how to add an item to an array that is part of a struct in a map?
I'm trying to add transforms into an array
Problem you are facing is that the find node returns a copy in BPs
So you are adding transforms to an array of a copy of the struct
Cache the result of the find node
Add to that one and then use Add on the Map again with the same key. That will override the entry
@zealous moth
wrapping my head around it, ty
I'm not sure if the array in the break node is also a copy, which might make this even more ugly
Cpp is a LOT nicer in that specific scenario
the issue is that I have is that i need to add a transform every frame to that array, so I need to build them in parallel for as many keys as needed in the ma
map*
i thought about caching it but then I'd need to make a cache for each key which is not feasible (afaik)
can someone help me, this is due tomorrow and i have been working on this for weeks π
@surreal peak I think this will work in the end, thanks for the tip! π
I was going to make it a cpp thing but I like to test in BP first
I really dislike this kinda stuff in bp π
add at the end and replace π
Not enough info. You are setting the Level on some "Collision" Actor.
but you are getting it from your Character, and then setting the variable on your Character with itself, which is redundant.
but the level variable is on the character blueprint not the collision one
Then what is the Collision one you are setting?
I find it much easier to see in BP since you can at least break them in real time and see what it is. In CPP, it's a drudge to compile each time and test with debugs >.>
i think i figured it out
yeah meant this case it is three lines in cpp because you actually know if it is a reference etc. - in bp it is a lot of extra hoops for this kinda stuff
Just meant that it is tedious not that one shouldn't do it
if (S_DiceProperties* props = DiceStructMap.Find(MyDice))
{
props->TransformSequence.Add(MyDice->GetActorTransform());
}
hah true true
I like C++ more there :D
touchΓ©
hahahaha I know i know. I'm not a programmer and I try my best to name them right in cpp
Each die has a property struct. So if I have 10 dice, I want to keep track of all of them and their series of properties. So I made a map for each. @surreal peak
I am not sure if there is an easier way to do this
this is in the player blueprint, when I colide with 'Collision' (just what i decided to name it) the level is set to 2.
I was going to refactor near the end
this is the widget blueprint, on level 1 the level variable is 1 but on level 2 after i have collided with the object it is still 1 when it should be set to 2
It is set to Construct, which is the equivalent of "begin play"
so there is no update
yes but the widget is constructed multiple times
so it should update every time the widget opens
would an event tick be better?
But... each Die is an Actor with Properties, why do you need to copy those into yet another Struct? An Array of Dice should be enough, the Die actors have their own info.
What you should do is this:
Construct -> get player character -> cast -> set up a variable reference to the widget
And when you need to update it, make a custom event in your widget that increments and changes text and call it every time you collide
oh nononononono, no actors
static meshes
comp*
o.o
the only class is the player controller
it makes dice as SM components (thinking of doing HISM but too many dice variations from D4 to D20)
How do I setup a variable reference?
and then I probe the dice
Hm, well you could make your struct in C++
Why are you grabbing Level from the Cast and Setting it back?
And save the Comp ref in it
And override the == operator to compare the comp pointer
in your player character, make a variable of type similar to your widget bp
Then you can use it in an array
Level is changed in the character blueprint
Ok but why you setting it back in itself
im just trying to get it so i can reference it later
It's utter nonesense
hm, I never thought of it. I will look into what those words mean and see if I can implement it ^_^
Is this some school assignment?
Stuff like this escapes me
If we ignore the fact that you are basically learning UE4 for an assignment that wasn't meant to use UE4, you still seem to be lacking fundamental programming knowledge. Didn't they teach that before the assignment?
You are setting the Level, in that red circle, of the Character, to the level, of the Character
@surreal peak π
You are setting the value with the value itself
Nothing will change by doing this
This whole thing can be divided into multiple problems
The first one is updating the Level in the Character
Which I guess you figured out by now?
The second problem is making sure that this value is updated in the Widget
There are multiple ways:
- Worst way is to query the value on Tick in your Widget.
- Second worst way is to use a Binding, which is basically ticking, to query the value.
- Better way is to save the reference if your widget where you are calling "CreateWidget", and using that whenever the Level variable changes to tell the Widget to update.
- Probably the best way would be having an EventDispatcher in the Character, that calls when the LevelVariable changes, and binding to that in your Widget, but this is the most advanced way.
If your teacher or whatever doesn't care about performance, just query it on tick
But man, i don't see how this is even remotely a good exercise for anyone
im not learning ue4, ive been using it for months and have had multiple courses but i jsut decided that i want to learn more in depth
Eeeeey, I too have been using Unreal for months and haven't learned anything π
yeah pretty much why im in here all the time aha
I knew it was going to suck when I started I'm very much not a programmer. I just want to make a thing that makes pretty colors when I play music
i know this is probably wrong but is this doing the tick thing?
Nice. I just got bored one day and decided to do something with my life.
I might get around to that eventually
That should work
thank you
Hi I'm new to UE4 with no programming background, I'm making 1-2 combo attack, it seem to be working fine but I feel like this is not how it suppose to work. Can someone tell me if I need to change anything? π
Then show the whole code that changes it to 2, because you only showed a very small portion
thats it
i colide with the object
it changes it to 2
then after i colide it also changes the level changes to another level. the widget is when you die. the button 'retry' is retrying level 1
When we talk about "Level"
Do you mean just the Variable called "Level" or do you actively mean another Map you open?
Level2 and Level1 are the maps, Level is the variable that I use for the widget to tell what level the player is on. The default value for the variable is 1 because the player starts on level 1
Is this the Select Node you are mentioning? If so, what is the Input (Option 1/2, Index) and Output (Return Value)?
question:
if create an event by drag and drop delegate - and select the "event"
https://i.imgur.com/fylcKuu.png
the created event should bind to the delegate automatically?
Or does it just create an event with an unbound delegate signature? (this is what the check shows)
What should be the default behavior by design?
what's the point of just creating an event without auto-binding?
https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/Blueprints/UserGuide/EventDispatcher/CreatingEvents/
Are you changing the Level between these two events?
Because UE4 destroys and respawns your Character when the Level changes, which would reset whatever you set on the Character.
If you need that to persist, then put the Level Variable into the GameInstance.
How do I do that?
Make your own GameInstance class, set it in the Project Settings, make a Level Variable in that and then set/get that one.
Yeah I am confused lol
You'll figure it out (:
Really sorry for wasting your time you must hate me now. But I figured it out. On the level2 blueprint I just simply set the level variable to 2 on begin play.
What do you guys think it's the best way to collect the empty space between 2 points? Is there a trace that also gives an exit point?
Cant eqs be helpfull for this to some accuracy?
multilinetrace is also an option
But doesnt ai sense hearing take into account obstructions and whatnot?
he comes here every day trying to recreate ai sensing π
hey it's coming along, sight and damage are done π
Ahh π i agree, requirement is uncertain :p
but still interesting
I just want really simple senses that are easy to debug, I prefer mine to what the engine gives you
spidey senses
so there isn't a trace that gives you every hit right? I guess I could run them on a loop and compare them on the way backwards
he just told you that multi line trace gives you every hit
oh I thought every overlaps? I'm trying to debug and getting only the first hit, probably doing something wrong
a hit is a overlap, isn't it?
I think they are separate, might be wrong, I usually am π
Hello people. I have a problem with a Structure which is stored in a SaveGame. From my HUD blueprint it reads the right value. But from another Blueprint it just defaults to the initial setting. I had this earlier and it was fixed by renaming the Structure. But this time it isn't working. I tried everything. I renamed it 3 times and deleted the save game to have a new one. The problem still persists. Can anybody help me?
have you tired deleting everything but the came content and restarting the engine? It fixed a few problems like that for me in the past
@fallen glade I don't know what to delete to not destroy my project. Could you give me a little advise?
these are usually safe to delete but make a copy beforehand, I would suggest taking the time and implementing something like P4V so you don't have to worry about this stuff
Thanks a lot. I'll go try that right away. I'll dive into to the P4V. I don't know what it is yet.
it's just a software that stores your files in a secure way in case of deletion etc, nothing gets deleted and everything can be brought back
if you can retrieve your files easily that's good enough for a solo project
Thanks a lot going to read the article!
Have you looked into quaternions? Also where are the points you're examining in the videos? Hard to tell what's going on, I assume they are just actor locations?
You're right, they only get initial overlaps / hits
yeah, just actor locations, yes, i used solution from topic on the link
I've remedied by creating a custom channel that overlaps everything, now I can test the space between things easily
hey i have bots i wanted that player can choose it how many bots he wanted in game so how can i do that
maybe then you're reading the variables in the wrong way? give more info maybe
i am not familiar with quanterions myself, so i simply copy-pasta, the only difference i made in code was this:
FRotator UCriminalsLibrary::MyLookRotation(AActor *pawn, FVector lookAt, FVector upDirection)
{
FVector forward = lookAt - pawn->GetActorLocation();
FVector up = upDirection;
It's weird because that doesn't seem like a gimbal lock issue to me, the actors are sharing the same plane and all. Have you tried other implementations?
Hi. I can't find a way to get this data in blueprints from static mesh.
you should post in #cpp
No way to do it in blueprint as far as I'm aware
C++?
No idea, you can stil get bounds though
Yha. I was using each shape hopefully as a hitbox but I guess no luck.
@fallen glade https://blueprintue.com/blueprint/ec0vd52y/
This is the way I read the variable and print it to screen. The strange thing is from the HUD it's working. It's just in another blueprint that it isn't. (It prints 600 which should be 90)
what are you trying to do?
Specify hit boxes in static mesh in those primitive arrays.
ye, tried this one https://answers.unrealengine.com/storage/temp/266749-tempue4image.jpg
tho i got wrong rotations totaly
Perhaps I could inherit static mesh and specify data there and write functions to get that data?
This is probably not what you want to hear but there are some really good hit boxes plugins on the marketplace I've heard :), if not you can do the calculations in a separate blueprint?
I have hit boxes done mostly I just wanted a nice place to put the data that is universal.
that might as well be Arabic to me xD
This is how I am doing it right now and I do not like that the data of hitboxes are from components.
you could create a master weapon bp? i've never done it myself
yeah) same here, anyway "find look at rotation" node produce same results with rotations
oh so you want the ability to add multiple ones in case you need them?
I have a lot of look up rotation options in my engine but they all come from here https://www.unrealengine.com/marketplace/en-US/product/dragon-ik-animal-inverse-kinematics/questions not the cheapest I know
this?
Yes and not have data from components. I think I am just being picky. I'll figure something out. I remember when I modded Fallout 3 that hitboxes were on the mesh files and wanted something similar. Thanks.
Hey, what's the best way to organize blueprints when there is a branch, after branch, after branch. Is there a better way of doing this?
yes you can use boolean logic in engine, and, or , xor etc
Maybe use "or" / "and"
@fallen glade I found the problem. I added a delay to the timer blueprint node and now it works.
nope "find look at rotation" https://i.ytimg.com/vi/893RCg0og5s/maxresdefault.jpg
yeah, nothing free seems like)
good you've figured it out!
Yeah but it doesn't feel right
to add a delay
I think it has to wait till the savegame is fully loaded
This should be by event
yes you can activate the object manually instead
just create a custom event "Activate" or something like that and replace the bigin play
Will do, thanks a lot!
np, good luck
So if they only overlap you get all points?
yeah!
π
well, entry points and then I do a trace on the other way and get the rest
Hmm. Testing out a while loop to trace from each hit location untill desired length
Depends. Does every path execute something different or is this just A and B and C and D?
Well I'm curious on how to do it in both cases. In A, B,C,D I can just use boolean operations, but not too sure with every path execute something different
There's switches aswell which can be usefull in some cases
I dont often find myself needing to serialize a bunch of conditions like that
Do you see anything wrong with this? I'm trying to calculate the direction of movement (-180 to 180) for feeding it into a blendspace.
The problem is that I get quite weird behavior around (what should be) 0 and -180 and 180 degrees
This is what I meant by "weird"
I also tried using Get actor rotation instead of get control rotation, but while I didn't have any issues like that above, the direction was off by a few degrees for the left/right strafe as well as diagonal walks, so instead of being exactly 45 for diagonal right, for instance, it was about 43, and instead of being 90 for right it would be about 86.
Which is weird since when using GenControlRotation it's those that are calculated perfectly but it struggles (as seen in the video above) around the forward and backward direction
@serene fulcrum show your blend space
@faint pasture
Those animations at the bottom are all idle anims and are not really necessary...
Is there a way to get the updated variable? The default value is 1 but it is changing in others BPs. It doesnt change in here and its pissing me off
Where are you changing "level number"
What I mean is it depends on if you expect to have 16 different outputs of these four booleans or are you just trying to check if four things are true and then doing something. It all depends really.
then it is changed again here but it stays at 1 after this
@ivory shadow If you really must have 4 branches in your code path then you gotta nest like that, but if you're just trying to catch a specific case than you can just do like
If(A&B&C&D) DoThing
Sorry for the late reply, was busy
Is this what you are saying? How do I set the Attk Count for it?
So you are changing it for each level BP I'm assuming . on begin play ?
yes basically
Show more of your characters BP. Specifically the Branch
which one sorry?
oh
this is the loading screen level
im trying to get it to decide what level to 'load into'
How about adding some filter ?
I was going to say that it may be because of variables not being persistent between levels but you are manually setting it so idk.
Is it always returning true for (1) ?
@gentle urchin what do you mean by filter?
i think its always referring to its default value which is 1
filtering the problematic values (so you'd ignore flickering around 179- -179 degrees
can you cast to a level blueprint?
Im thinking having some deadspace could help
I changed the default value to 0 and thats what it was the whole time, not changing to 1 or 2
Ah, I see what you mean but there are 2 issues with that: First the "dead zone" would have to be quite big as it goes to about -+150 degrees when going backwardsand -+30 when forwards. And second, this seems like a band-aid fix, I'd like to understand what's causing the underlying problem in the first place.
I agree, it definitely is a band/aid fix to it, and with those values surely its a bad one π
I think you need to be using a game instance in this case
i have no idea what that means π€£
In my case it's very important to get as exact as possible values for the direction in order for the blendspace to not really have to blend between anims but rather just select one (i still need the blending for transitions tho). The reason for that is because most animations don't blend well together and the feet of the character are clipping trough the ground.
If your animations don't blend well start with fixing that.
They should all be same length and have same rhythm, that is, left foot right foot etc.
@faint pasture they blend well in transitions that should happen. However if the direction values are wrong (like in my case) they look and feel wrong because this is a position it never should be in.
But this isn't really about animation, otherwise I should've posted in the animation channel I guess, I'm just trying to understand why the way I calculate direction is wrong.
I also suppose rounding isnt accurate enough ?
Nice, it is working now, appreciate your help
May I know what is the advantage of using math rather than hardcoding it? As right now I only have 2 attack sequence
velocity is unstable, making any product of it unstable
@gentle urchin I thought so too at first, but that still doesn't explain the difference in behavior between get control rotation and get actor rotation. Also the differences are huge imho.
can i have some help with my animation blueprint?
i have set up rolling and attacking in my player blueprint but when i roll i cant attack anymore
@serene fulcrum I'm not sure the calculation is wrong, it's just that if the velocity is slightly left or right of forward, the resulting animation looks like ass
You will never get a velocity exactly at 0 angle unless you're rounding.
@faint pasture if that's the case, why does it behave differently depending on the way i get the character rotation?
Is poible making this use only BP
@serene fulcrum I've only seen the one way that you are calculating yaw and it doesn't seem to be too obviously incorrect, assuming control rotation is what's driving the rotation of your character
Even when rounding its possible to catch rounding errors with floats aswell
My bad, I didn't link them both here. Here's the other way I tried:
This is what I get for direction when moving directly left / right:
Actor rotation based on root bone rotation?
No, this is the default character from the epic third person animation pack, i only changed the anim bp but left the initial movement logic intact.
from the character bp that is
Dont you want direction to be based of control rotation tho , assuming its third person ?
Not that it fixes anything, as you've pointed out
But i'd think that would be the preferred method, and what should be solved properly
i could be wrong tho
What do you mean by this? Having my actor's rotation follow the control rotation?
Not follow, but move relative to (and use the appropriate animation ) control rotation (movement relative to camera looking direction)
Like this?
Well yes, but that's only walking forward ^^
Walking "to the right" would then give you a +90 degree in direction
Apparently i suck at explaining, sorry for that π
ah, so you mean the controller should always be facing in the direction of movement?
it's most likely not your fault, i struggle to understand things usually :))
I'm clearly mixing things aswell
In which scenario does this happen, just for curiosity ?
it flickering like that
Ah, I think I found the culprit. The default movement logic used the control rotation to determine the right and forward vectors, but the character was already setup to both use the control rotation as it's own (that "Use controller rotation yaw" boolean) but also it's movement component was set to "use controller desired rotation". In the documentation it even says that if the movement component uses that setting the character setting should be disabled.
So they kept fighting for control, or what? π Glad you found it tho
I'm not sure what was happening π
It still flickers when going backwards tho, but that's just because of rounding errors and going between -179 ant 179 really fast, but that's easily fixable using the "band-aid fix" you mentioned π Thanks for the help!
rounding / filtering for delta should help you out
so delta must be atleast .2 before you'd care for it f.ex
can i have some help with my animation blueprint?
i have set up rolling and attacking in my player blueprint but when i roll i cant attack anymore
forgetting to reset some blocking bool ?
When working with Spline Mesh Components...
Is it possible to remove the shading caused by the in/out tangents on the spline point (even when it's set to linear)?
yes
I've done it like this: https://blueprintue.com/blueprint/0xjtjxk5/
you can do that in the material itself
look ok to me but the sword is parented incorrectly? it's going really fast to see
why are you going twice through the blendslot?
Hmm i'd expect the wrong result here but if it works it works
But i suppose you got the solution verified with the debug data?
Nvm, I see what you did now π
forward and backward trace
I tried only forward, but initial overlap causes some hickups
It worked, but ended with alot of traces
Does anyone recommend any simple linear quest tutorials? I've been looking around but for the most part have only found tutorials explaining how to create an rpg style quest system (i.e. pick up quest from npc, complete objectives, return question to npc, rinse and repeat). I am looking for something simple where the player is given a quest objective, he/she completes it, and a new one appears to progress the story. Very linear. Any recommendations would be greatly appreciated. Thanks
@fallen glade
RE spline materials.
I've barely touched materials, can you point me in a direction to look into?
to be honest I don't know which one would be cheaper, lots of calculations on 2 traces or lots of little traces?
Have a look at this: https://www.broad-strokes.com/2015-01/coconut-express-bonus-content-low-poly-mini-tutorials/
This post is an addendum to my guest blog on the official UnrealEngine website. Enjoy!How to use flat-shading on a landscape materialThis is pretty simple, actually! If it were a Static Mesh instead of a Landscape, you could simply import it without smoothing groups for flat shading, but (as far as I know) there is no way to directly tell a mate...
as you said it seems very simple and custom to your needs. Hard to explain how to do a whole system from scratch. If you know blueprints basics you should be able to just write down what you need and have subsystems deal with that. In your case you would need maybe a blueprint that tracks and gives the quests when they are finished?
Does anyone know why it Cast Failed?
This is from another Blueprint
pawn is not of enemy class?
probably yours
The enemy is under Pawn class
The weird thing is that multilinetrace already contains the information we were trying to create
so by diving into its functionality one could probalby extract or expose that exact info
how can i spawn same actor and then choose 3 of them to stay alive and other 5 get destroyed? without creating 20 different actors?