#blueprint
1 messages · Page 346 of 1
no your fine lol
i help people all the time, its no big deal sometimes i just give the code
its easier then explaining
god bless your heart
How do you sort object arrays (alphanumerically)? --or is my strategy just wrong?
Trying to load arenas that cycle through an array i.e. arenas 1,2,3,4:
- top image: Get All Actors of Class for level instances gives me a scrambled array (2,1,3,4. not 1,2,3,4)
- mid image: converted to a string array so I can use Sort String Array to sort it by display names (arena_1, arena_2, etc.)
- bot image: there's no Unload Level Instance (by Name) đŹ
You could map the instances using their name as a key. Pull from the map to unload them.
perfect solution works now! thanks.
If I'm making a blueprint-only actor component, is there a way to override a function on the actor that owns that component from within the component blueprint?
You can fire a delegate instead which can call function on the actor level
@normal furnace here is example, you have a delegate in the actor component.
In any actor that has the component, you can select the component and fire a function when that delegate is called.
Any actor that listen to the delegate can fire their own respective function.
I think that's what you are after because owning a component can't magically override the owner method.
Don't forget that you can add input variables, and I strongly recommend including a pointer to whoever broadcast the event for the first variable.
not sure if that's related
You don't need that for components so much.
you already have the ref to the component anyway, you have access to it's properties
Depends on the component. Some maybe if you're doing some generic component manager. But in this case you know what component broadcast too due to the way they bind in the actor.
@hardy merlin were you asking about how to manage camera the other day?
Yes.
Thank you! Much appreciated.
I speak from experience. If you're suddenly binding multiple things it becomes a problem tracking them. I just always include a source pointer as a baseline so I dont have to change the signature later.
I think ultimately if you want custom behavior you can just override the event in the camera manager. That will be what you are seeing.
Not into this deep my self, but I manage to yoink Lyra Camera.
The way they do it is they use gameplay tag to switch to different camera mode.
What ever the camera mode is, ultimately the UpdateView is what the camera sees. So you can override that and have any custom logic you want.
Noted. I'll begin investigating.
this might not be related if you are asking for temporary control for cinematic or something like that but Lyra implementation to address clipping issues on the corner is an absolute life safer for me because I wouldn't be able to come up with the logic my self for a long time.
tldr: it works where spring arm doesn't.
That reminds me. I need to check out that one sample project with PCG and the camera thing.
Anyone know why I have a "-1.00" at the origin of my empty scene?
O.o
Editor stuff that draws on screen perhaps
From within a widget, how can I get the player controller that owns the viewport of the widget?
GetOwningPlayer
Cool! The last thing I need is that when I click the Resume button I am hiding the menu but I also want to have the game view re-capture the mouse pointer. How can I do so?
For like a shooter?
Third Person template, yeah.
When I click Resume, the menu hides but the mouse is not captured so I have to click an extra time.
Should work with a SetInputModeGameOnly usually.
CommonUI is usually a better way if you have the time to learn it and adapt to it. It's activatable widgets swap input modes for you.
Is CommonUI official or a marketplace plugin?
It's in engine
is this some engine bug, or it's normal that setting collision profile to MyProfile turns it into Custom instead of MyProfile ?
help please
it happens sometimes, not all the time
which is why I'm asking
bruh, channel is so dead
or ur issue didnt happened with others.
I mean, in that case people could reply : it's potentially an engine bug
The change happens when you make a manual modification to any of the collision settings on a component, such as a static mesh, in the Details panel. Even if you've already assigned a named collision preset, any individual overrides will switch the displayed preset to "Custom"
this is what the googles says about it
It is completely normal behavior for a component's collision profile to change from a custom preset like "MyProfile" to "Custom"
does it just switch to custom when you click on it immediately ?
like you click the profile and it auto switches to custom ?
That sounds like an A.I
By google do you mean gemini?
yes it was just what came up with the google search
Treat A.I as guess at best
yes i've known it to be unreliable
thats why i mentioned it was "google" not me saying this
Yeah Apparently it was that #cpp message
Though, the weird thing is that the Print call is right after the SetCollisionProfile .. and it returns "Custom" often .. which is why it was not easy to guess the issue
So yeah its solved now
I hate that the first thing that pops up on Google now is AI shit. It's never correct for me either.
prompting ai is frustrating lol getting it to help with blueprint stuff is usually a real hassle
1000 prompts later i get something that works hopefully
I hate how every so often, Google will pop up with a modal asking you to try more AI things and you have to close it to get your Google result.
Wait
Tmrw I do want to improve on my Unreal Blueprinting skills, mainly with moving my current movement system from the Character Blueprint onto GAS + Build up said Characterâs Player State/Player Controller.
I like how theyâre saving money by asking you if you want AI to get you a summary after the first few searches where itâs automatic
how do i become as smart as you
Perseverance
i have a problem to where whenever i teleport my skeletal mesh somehwere and walk backwards, it starts spazzing out. and its done the same when i used a cable component instead of a skeletal mesh, i don't believe its something to do with my code (i can show it anyways but someone already said the codes fine), but i believe its something to do with something in the details panel.
Watching a bunch of videos will give you a vague understanding of things. But you need to learn to learn. Dig in, make things, understand the numbers and concepts. Don't just watch.
not smart at all, takes a decade to just be where most people are in a year.
I don't even touch a lot of things I should have. Common UI and asset manager being one of them đ
probably do a lot of small 3 days game projects
and try things .. without being afraid of making mistakes
I did and there is a point where I unlearn a lot from what I see in youtube.
anyone know why?
the smart people don't really grind youtube tutorials. They have problem solving skill and read what they need to know.
"something in the details panel" <-- you would hope this is the case, your using physics handle ? idk what sort of setting your using, but i think i saw the code the other day. You were setting a variable in multiple places and then now your not right ? and it only happens when you go backwards ?
it looks like it's fighting for position or your setting it's location more then once
it also happens when you go side to side
and i was only setting the variable twice yesterday, technically.
also i would try #animation like i mentioned, just to valid your using the animation stuff coreectly
its not a animation because this exact thing happened with a cable componenet i used instead of skeletal mesh
so your only setting it once now ?
no, the other part where i set it is for grabbing objects
show the two spots where your setting it
and that doesn't even get executed until i grab something
right but your grabbing the ground ?
yes
it still does this when i grab objects.
i thought it was something to do with camera lag, but apparently not?
and if your holding something it doesn't do it right ? so did you try to set the target location to grab point when you grab the floor ?
yes
found something, even when im not grabbing a object. it still spazzes out in a subtle way
so it has to be somewhere outside of the event graph
idk what you keep saying in the details panel, your saying physics handle component has a setting that fixes this ?
what is it?
I'm fairly confident its something with your animation and the target points
especially if it does it without using the grab point variable
well it was happening with the cable component, so i don't really think so. but can you try explaining what you said about the physics handle?
cause that makes sense if its the physics handle messing something up.
idk what your saying, i was asking you a question
so show the way you set this its a bone transform on a boolean right ?
show where you set the boolean
ok so one sets is grabbing, when is the other one running ?
when do these run ?
the other one is when it cancels
first image is when it cancels
second is when it turns on
first image, grapple on = off. second image, grapple on = on.
first image, when you let go, second image, when you start grabbing
at the end of tick on your character
print this boolean
is it is grabbing ? is it flip fopping ?
see if its working correctly
its always printing true
but that doesn't matter as that string will only print when i pick up a object
and my problem is outside of that
geez
my problem is outside of animations
ok...
that proves nothing
it defiantely could be the animation
and your not checking like i would of hoped
obviously not at the end of a bool restricted thing
heres a better option
but the print string at the beginning of the tick
do that instead
and see what it says
do you see these warnings ?
i would fix that
looks like your collision doesn't have physics
this could definately be an issue
accessed none
this means the value is empty
click on where it says print string
is it "already fixed" ? or its been throwing this error ?
don't know, i deleted the print string before sending that but didnt compile so who knows if thats a old error or not
but that error has nothing to do with the issue
you should know
and yes it does
it breaks everything
it could be the problem
you keep saying its in the details panel
but i don't even know what that means
you have to fix your erros
and debug the problem
you should know
theres most likely something here breaking it
what in the world makes you think that ?
how am i supposed to debug this?
maybe because i said already that this happened with a cable componenet i used instead of a skeletal mesh, and the fact that it spazzes out even when im not grabbing anything
its not related to the event graph or animation.
its outside of those.
ok, good luck
if you really think it's in the details panel just mess with all the settings
but it's probably not tbh
but you do whatever you think is right
then what is it,
i'm just debugging
could be many things, you have to debug, this is very common and how you fix problems
it's very rare that a problem happens and you just say, this is the solution
debug the thing
you have errors
fix those first
before you do anything
and the warnings
and you might see this will fix it, if it doesn't go to next thing
the same way you debug anything, step by step make sure everything is working correctly
but just assuming its in the details panel is not a good way to do debug
lol but it could be a setting you might be correct, but you need to go down the list
its outside of the event graph still.
ive already said how it is,
engage is telling you to debug from the beginning, because even if the problem lies in the details panel or not you can come across many other issues or not from a full debug.
Prints and Breakpoints.
I'd start by solving the two warnings in your log. Both of those could most definitely cause the "spam" issue.
You never know, just try.
Ok, I fixed it in the details panel
Was a problem with tick settings đ
Is this the correct way to do this? It feels off...
Right click GetChildComponents and at the bottom ShowExecPins
Other than that, Not sure. Maybe? Not many people use ChildActorComponents much anymore.
Is CAC not borked anymore?
Is there a better way to cast the children to an object to call a function in them all?
Not really.
Going with this, works fine enough
cache the array
that node runs foreach one of the loop
because it's pure
Pop out them exec pins!
is there a way where when one physics actor hits another the mass of them equates into whether the one being hits gets any impulse or anything from it
I bassically have a turret firing projectiles at astroids but I don't want it to be the projectile causes the astroid to get sent off
espically when the projectile wouldn't have that much power
Hey Anyone know how to use PS4/5 controllers D-pad as button inputs ive got the rest working but all tutorials jsut wanting to use the value inputs from it i just need them as buttoon inputs (Using Raw input IPlugin)
Does anyone know how I can unbind from an event through blueprints?
Same way you bind, just select the unbind
but what node do I pass in as the event? Is there a node like the "Create Event" but just for retrieving an event?
The create event node is just a shortcut so you donât have to plug in the actual event node
So this would unsubscribe it?
Yep that should do it
So if BP_WrongPlace has a function I want to move to BP_RightPlace. And that function has already spread around to dozens of places. Is there no way to cleanly move it without having to do a copy, and go through all the nodes and update them manually?
doesnt seem to work
+FunctionRedirects=(OldName=âBP_OldPlace.MyFunctionâ,NewName=âBP_NewPlace.MyFunctionâ)
What is the best way to trigger behaviors on level transition?
I want to do a fade in when entering the game from main menu, but not if just using PIE
https://youtu.be/KufchrLIOaQ
Any idea why my widget works with on click event when using a keyboard and mouse sometimes but not with other setups?
Is it something in that it's selecting the image and not the button itself?
On click works with the base "battle menu" but not with any of the sub menu's
To anyone who has worked on this before: https://github.com/Narxim/Narxim-GAS-Example/tree/master
I'm thinking of applying my Movement Controlls to GAS, but I'm unsure where do I start + mainly on if its possible to do so. If it is, how would you guys do it for GAS?
Also I need help setitng up Player Controller/Player State(mainly for future plans, but I just wana set it up early for my Single-Player game first).
if we forget about the "preventing cheating" aspect, why shouldnt i have vitality levels like hunger/thrist be calculated on the client side
if youre thirsty enough, you slow down. if youre too hungry, you'll die, but this can all be handled on the client no?
i dont see a reason to have the server aware of these levels
is my reasoning correct?
Server saves the game. Has no idea wtf Client's values were at savetime.
mm, youre right
but if we werent considering that as well, would it still be okay to run on client
just checking to see whether my understanding of "what things should be replicated" is correct
It's also a general state management. Consider if you want to put a character in like a hunched over tired looking state when starving. For the server this is simple replication. For a client you'd have to be constantly telling server what the values are anyhow so that it can tell every other client.
In a nutshell. It just complicates things to not simply do it on the server and let clients be a peeking window into the "real" world.
ty
I havent used Narxim but I am prettt comfortable with GAS.
The key thing would be creating attributes that would modify movement, and then overriding the Character Movement Component's various functions to use those attributes. For instance, I have move speed and turn speed multipliers as attributes.
What kind of help do you need with player controllerm
Will share both my Character Movement and my Player Controller after my Japanese language classes, so mind me for the delay currently.
Character Movement will require C++
for multiplayer, yes.
single player you can use blueprint to further degree for cmc
hi, is there a reason that this code is not working in a standalone game?
Is there a reason why audio only plays after I release my movement keys (WASD)?
initially thought it was just firing play constantly so i never get to hear it but the audio should stop still when no movement?
Hey @lofty rapids (sorry for the ping, but i think you'd know this), im trying to teleport my cord to the object so i can grab it, but it goes to the center and not where i grab it (im trying to grab it at a corner/edge), and ive tried numerous combinations of follow camera +/x/\ grabbed component, and for some reason i cant figure out how to do this basic stuff.
Well for one youâre looking for an exact match to a float
Floats can be like 0.00000000000089 . So it may never reach actual 0.0. Try near equal instead with a low margin of error
might be to do with grabpoint, since thats where i grabbed it actually
Get world location will usually give you dead center of the object
You can try line tracing to it for more precision
i am, but thats not in a event tick.... should it be?
i just put it in a event tick
it works
but it is now sliding and not anchoring onto the object
hence why i did get world location
No need to put it on tick, you line trace when you aim at the thing and press the button
Then you get one result, not 60-120 results per second
yeah, but then the arm will stay in one place to whereever i grabbed it.
and not move the object around
Thatâs more of a physics issue now, not so much about where youâre grabbing it
uh what? the place where i grabbed it is just not being updated
hence why it wouldnt move my hand to the object
EventTick -> "IsGrabbing" -> UpdateGrabPosition
OnGrab -> IsGrabbing = TRUE;
EndGrab -> IsGrabbing = FALSE;
sounds like something one would do in the animbp
like ADS
guys, for damage number widget, on screen render should be more performance friendly right that world (widget component) ? is it worth for screen render implementation than world considering performance. or actually it is not a big deal
Widget Component itself is shitty expensive if you need to draw a lot. They will all count as an extra transform to update. You shouldn't use them if you want performance.
Have a Widget with a CanvasPanel and use a custom ActorComponent that can register to some manager that returns the world location of its owner.
And fwiw the widget that should be drawn.
Then do the math to place the widget on the CanvasPanel yourself
ah, thanks man, now I am sure then to not using it. yeah I consider it because damage number is dynamically added to world and a lot of them, so I have doubt using it, but screen render will have another complexity to implement. if it is worth, i will go there
try using socket
so you have it grab in the center, you want it to grab on the side or corner ? Maybe use a line trace like suggested, and just put the hand where the trace hits. Do the trace when you press the key, and put the grab point to the trace hit location ? this will grab wherever your trace lands. Do you want specifically a certain side of an object ?
Guys, I need help on how to make it so that when I press the pressure plate, the wall goes up? I can't find a normal tutorial and I can't do it myself
wdym "press" ?
probably just a door tutorial and instead of rotate move it up
if press you mean click it's easier then pressure like you put stuff on and the weight has to be something
Get a thing to print hello when you step on it.
Get a thing to move up when you tell it to.
Have the plate tell the thing to go up.
What will be the best way to implement animations for +100 types of weapons?
Situation:
1: Weapon animations don't rely on IK bones.
2: All weapons has unique set of animations for upperbody pose: Base and Aim Offsets :: [crouch, prone, stand]
What I'm doing currently is?
:: Have a single anim bp class in which all the animations are implemented which is i think not the best way since i can have multiple anim classes which will be set by the weapon to the owner which is a the character.
but doing separate animation classes needs extra work like transiting the character to the old pose after setting the new class.
example:
Currently in AKM crouch mode
Switch weapon to m416 the character will transit to the stand pose with the new animation class which can be solved by a sync loading the new animation and set the old state crouch before setting it to the character.
I do have GAS Helper(the plugin) if that helps, since I'm new with C++
While for my Blueprint, I've put them all on the base BP_ThridPersonCharacter within the EventGraph as shown here: https://blueprintue.com/blueprint/bec2xiy-/
While the important components for said movement system as listed -
GA_Dash: https://blueprintue.com/blueprint/75qb8u4q/
DoubleInput: https://blueprintue.com/blueprint/6erq20kq/
DirectionToDash: https://blueprintue.com/blueprint/1illz9rr/
The main idea is to port all of my movement inputs as GAS Blueprints, for modularity reasons. Also I want to learn how to handle GAS effectively myself beyond RPG stats IMO.
While with Player Controller/Player State, its mostly setting them up in a Single Player context(so that I can use them for future MMORPG plans), moslty from here: https://forums.unrealengine.com/t/player-state-vs-player-character/319281
Weapon should carry references to the anim assets it uses.
why cant i convert enum value to name to get datatable row name, but i can convert the enum to string and string to row name and it works?
Exactly this is what I tried, which reinit animation class on switch... means lost the old pose untill re notified or a sync load and set the old state and set to the character
one thing i didn't tried is make all anim classes derived from my base anim bp
not sure if it will solve it, but i think the base bp will have the old state and will just auto notify the child bp on switch
enum values are uint8 internally, an integer index of a state
Name shouldn't be used in code
enum as rowname sounds like a painful life decision....
i use enum as its a fast way to grab the 6 rows i need in a specific situation
What i didnt understand was the difference between these to options
yea but i'm 99% that a gameplay tag would be the better choice to begin with
print the result and compare them?!
i printed and the print shows the same
Not 100% sure but might just not work at all in shipping.
Enum is a tarted up int. Don't rely on the name.
also the enums are numbers and row names are numbers
DataTables expects a string as the name of the row not the integer
when using print string it also converts to string ofc, forgot that part, thats why i was confused
Hello, I'm having some trouble. You see I'm trying to get all parts of the wall to move currently when I press the button only one part moves not all. I've tried parenting and using children but that didn't seem to work at all still only the one moved. I've tried some other methods too but nothing seems to be working any ideas?
@spark steppe
public enum Status
{
Active,
Inactive,
Pending
}
string rowName = Status.Active.ToString();
DataRow row = dataTable.Rows[rowName];
do i want to open rider now....
no
but i did anyways
TMap<FName, uint8*> RowMap;
did you try grouping them ?
yeah this should also work
if (DataTableAsset && ensure(DataTableAsset->GetRowStruct() == FOurLinkedStruct::StaticStruct()))
{
for (const TPair<FName, uint8*>& RowItem : DataTableAsset->GetRowMap())
{
const FOurLinkedStruct* rowName = reinterpret_cast<const FOurLinkedStruct*>(RowItem.Value);
}
}
fugly, but ok
yes, and still only one moved
Hi, not to be a wierdo, i'm new here and I was looking for developers to contact and your idea kind of caught my eye. (And yes, I did scroll all the way up because I have nothing better to do) I would love to assist you on your project, I just want to work. I can write and make music. I don't expect any pay. I have sent you a friend request. If you're okay with this, please accept it, but if you like to fly solo, you can just ignore it.
you should be able to double click and switch between single and the group ? thats weird
Been in a bit of analysis paralysis. I have a combat component on my actor for a tick based combat system.
It feels like I'm having it do too much, but it's making the component reliant on other components being on the actor, which seems bad. Like... needing to have health component, needing to have a weapon component, etc.
Has anyone done similar and ... am I approaching it poorly? My thought was... any player or NPC with the combat component can participate in combat. Combat component would be where I put ... calcs for hit, calcs for damage, mitigation, current target, who is attacking current player, etc.
I'm currently in the process of something similar.
I would say, maybe it not NEED those, but make it interact with those.
Like, a combat component can still do combat, and if theres a health component, then it does damage.
Same thing with the weapon component.
Maybe combat can have a base like 10 damage, but if theres a weapon component, then do that much damage.
You could use interfaces to remove hard refs, or do abstract classes (1 BP file that has all the functions and vars created)
Then, a 2nd BP file that has the actual completed code, and filled vars
Awesome, thanks for the input!
That's kind of the route I was going but started to feel like I was making the component do too much. Guess I'll keep at it and see what I need to refactor or whatever, when I get to it.
Yeah, so far i've been keeping my components somewhat simple.
maybe a bit too simple, but it also removes 1 class that does like 80 things, when I really only need like 2.
I was thinking about init of the combat component and then doing a 'get component by class' and if not valid, throw an error that the actor needs a health component, weapon, etc.
Similarly, I sometimes feel they're either too simple / not as needed, or make them overly complex. hahah
Maybe needing a health component might make sense, but a weapon component doesn't sound needed.
But, that also depends on your whole game.
To me it would make sense to not need the weapon component, cuz maybe I wanna just having something fight, with a static value that isn't necessarily a weapon.
But, then to me I could split that into a couple components, to make it a bit more modular to me at least (but, like I said, I might be going a bit too far with my split up code)
Oh for sure! It was one of the things I was stuck on. Because my NPCs have a different setup. Like, the player has an equipment system component that handles weapon, armor, etc. But, the NPCs just have a base weapon / 1 special attack'. Like... "claws, 1-10" or something simple like that.
For sure hearing your stuff helps a lot! Much appreciated
I'll have a default 'unarmed' simple damage
Yeah, my current setup (while perhaps a bit much. đ )
Is I have an animation handler (for the replication of animations, and general handling)
Then, in the context of my game
The weapon component just handles the input, and cooldowns (since my inventory stuff handles the model being held by the player)
The NPC component is just an extension of the weapon component, but with more vars, for automatic attacking and the such.
Then, both of those components just detect anim notifies, specially related to damage, and then functions are called on them, about dealing damage.
That sounds like you've done a lot!
But, it also helps, cuz apart from the NPC component, the other 2 can be re-used.
Such as the weapon can be used for static mountable weapons, cuz the component just handles input, and cooldowns, no actual relation to like a weapon being held, or etc.
Its just told to send an animation request to the animation handler.
Then, the anim notifies handle dealing damage, or shooting projectiles.
But, thats also a big thing for me, personally.
Keeping stuff re-usable.
I don't like having a ton of 1 use components, or 1 component doing like 20 things.
When, 3 different components keep it split, and not require everything all at once.
I recently watched:
https://www.youtube.com/watch?v=i_7p8-DE15g
And it had me thinking about a lot of different aspects of my project that need to be refactored and improved.
But, it also got me in the analysis paralysis mode. hahah! For sure helps hearing other experiences and how they're implementing.
Yeah, it also helps to have a ton of prior experience, with the opposite of this. đ
1 file that does like 500 things, and trying to wrap my brain around it, or work around it, when I only need like 5 things.
haha, wow!
Is there a way for a sphere cast to ignore a object on the other side of a wall and get blocked
So when you detected some things with sphere, then you can do 1 more check for all of them with a line trace from origin.
Only when nothing blocks that line trace the actor will get added to ''detected array''.
- Detect All Actors with Sphere
- Check which ones I really see with Line Trace By Channel, make walls block that channel.
well, if i do that using the line trace i already have that only shoots once and use the grabpoint, then the hand just wouldn't move. if i use a line trace in my event tick function, then it wouldn't stay on the object and just disappear when i move it off the object
so i would probably have to do something like grabbed component world location x grab point/distance/impact point
you can trace from a point outside the item toward the center and use that as the location
"outside the item" can you explain what this means?
so you get the first point where you grab onto it
and the problem is it comes off of that point ?
yes, that would be grab point/impact point from when i first touch something.
the problem is, it doesn't move with the object
which is why i need to do something like grab point/impact point +/x/\ get world location of grabbed object
so your grab point stays on say 0,0,0 but your holding the item and it's not moving with it the item is moving and your hand is still on 0,0,0 ?
tick would probably solve this issue i would guess
a line trace in tick means the cord wouldn't anchor, and just keep shooting and moving
ill show a video of what happens if i connect the grabpoint into the hand location.
and on tick what happens ?
i can see because you never adjust the grab point
so it wouldn't work
it will just stick to the point
this makes sense
ill show a video of what happens with that,
i assume you mean event tick, right?
yes, set the grab point to the location of the object on tick
that should put it in the center
and then you just want to offset that
well i want it to grab wherever i actually grabbed it, such as a corner
this code worked for me, distance of object being the distance variable from break hit point
but its not actually anchoring onto it
which is why i need to incorperate grabbed objects world location into somethling like this.
start by grabbing onto the center
don't do whatever it is your doing in that video
it's a mess btw
physics handle > get grabbed component > get world location > anim bp grab point. boom center
do the original trace
that was the event tick line trace
uhm, wdym?
set the grab point to the center of the grabbed item
how can i update that on tick
eh why?
wouldnt that just be
physics handle > get grabbed component > get world location > anim bp grab point
alright, but that doesnt do what im trying to do.
im setting the grab point to the center of the object.... can i just make a new variable, and set it to this
inside the tick.
idk why you need a new variable ?
but you can do whatever you want
it's your code
i use grab point for grabbing the ground
ok
do i set the variable inside the tick, or when i grab.
you set it on tick when grabbing == true
ok.
ok so now you'll want to decide how you will offset this
do you want to hold it on the left, right ?
not specifically anywhere, just wherever the the point you looked and grabbed at
ill show a video of my old code and what it did. it might help
ofc it didn't anchor
but you could grab it anywhere on the object to grab it
ok you maybe calc the offset by getting the center of the object and subtract the hit result and save that, and add that to the location 0
calculate the offset.... like the distance of me and the object?
or of where you grab it and the center
"getting the center of the object"
"subtract the hit result"
and i think add it to location 0
center of the object would just be get world location.
i believe.
so it would be that - grab point?
yes its close enough it should be the center
although it may be depending on your objects the bottom
but either way this should work
don't do that on tick
alright
i put that code after the break hit result/trace
is it after you set grab point ?
yes.
and did you set it to a new variable named offset or something ?
is offset a variable type, or do i just use vector.
it's the result of the subtraction ffs
vector
i don't understand why i would need a new variable for something that would have the same code?
i can see that
am i editing it later?
Yeah i just don't understand...
ill make a new variable, still don't understand. what happens with location 0 after that?
exactly what i wrote already, read it
and what happens now?
the difference is one checks against the grab point for every tick
the other just does it from the start, and not when you move does that make sense.
you keep moving the grabbed the object this offset will keep changing if you do it the other way. you don't want that
your doing this after the line trace ?
after the grab point is set, yes
ok on tick add the offset to the world location before you set location 0
just to be clear,
offset
> location 0
world location
world location - offset = location 0
basically it's current location minus the offset
wait, subtract or +
you definately want to add
but something wrong you are not grabbing that thing ?
it looks like the offset worked but you didn't drag the item ?
shouldn't you be holding that thing ?
i was, it was just a heavy object
i can show it again
you really got to check your erros
you got an accessed none
and you've had the same warning for every time i seen your videos lol
wonderful
i think i fixed it actually
i just removed "get grabbed component/physics handle"
and plugged hit component
whatever works
the way it generates cause the line traces to generate in a square
is there a way to make the spread circular?
i might just say screw it and go with the hurtbox shotgun method
I've got this event but I don't think it's working the way I think it should
PlaceWellScenery is an expensive function, so I only want it to run once a tick
PlaceWellScenery increments CurrentHeightStep, but even if I move the increment to the end of this chain it doesn't work.
If I print out CurrentHeightStep at the start of each LoopBody is just prints 1
is place well scenery in the same bp as this one ?
whats with the delay ?
i think that might fk it up tbh
All in the same BP
it works find without the delay, but the issue is it's justo too expensive so it hitches, so the delay is supposed to split up the expensive part into chunks
it seems While loops cant use delays tho...
this is an offload to c++ thing i believe
you can make a function and run it through c++ this will solve your problem most likely
but a while loop is like that, blocking
Hi guys, is there a way to rotate AI sight smoothly ?
try lerp rotator, from current rotation to desired rotation
so im trying to get a specific variable that will be inside several different blueprints/items. how do i check/reference a variable from several different bps
do i just do branches and keep casting until i find which one is the one im trying to reference?
how do you not know which one ?
your looking if the variable exists ?
im just trying to explain it simple because people don't know what im doing, you know how im grabbing objects? im trying to get a value from the object im grabbing
problem is, there are several different objects that i can grab with a variable.
you can make them all have a parent, and then they will have the parent variable
how do you do this?
make one blueprint called PickUP
add the variable inside there
and when you want to make a new item
right click and create child
then use the children as your pickupables
but you can just cast to the parent, and get the variable
because each child is of the parent, so you can cast np
but thats what i would do cast hit actor to parent
Like this?
The Alpha is basically how fast to go from A to B, so 1.0 is instant
Try something like 0.1 or even smaller for a more gradual change
Also, you probably want ShortestPath to be true. Whenever to rotate, theres always a long way and a short way, and usually you'll want to rotate the short way
I'm trying but it does not work
Could be maybe to turn in "Set actor rotation"?
Did you plug the cast in or is it just floating like that in the Blueprint?
yes
I've put it in teh EnemyPatrol Task of the BT, should I put it in the BP_Enemy with a Event Tick?
hey, so im trying to figure out if what im picking up is the specific mesh that is the actor bp, but it keeps printing false.
this is just a general question to just gauge my terrible blueprint skills how long should it take someone (who has bp knowledge) to make a Minecraft style inventory with all the same mouse movements like splitting, single items, quick moving from inv to chest(all the goodies pretty much) also completely replicated ?
There's not really anyway to gauge that.
It depends on your skill level, how much you've planned out, how fast you work, if you've ever done anything like it before, etc etc
Any amount of time is fine (as long as it's not for work), because that's just how fast you work
understandable cause its taken me a little over a month and i don't know if thats bad or not, but you're right
appreciate the response!
The only time I'd be concerned is you're a month in and you've got nothing, or little to nothing so far. And only for the reason that you may find it more productive to start with a smaller thing and work your way up to build more foundational knowledge before you burn out. It's easy to get trapped in tunnel vision and end up burning out on something because you maybe weren't as ready as you thought yet.
If you're making progress, slow and steady progress but progress none the less and it's not just been a month of bashing your head into a wall just to have some empty boxes on screen, then I'd say refocus, take a break and try to figure out where you're struggling in particular
Guess i'll put this here?
With the Download Image node.
What sort of usage do the images have?
Are they 24/ 7 in memory, and essentially a virtual texture worth of size?
Or, some weird like saved temporary to disk?
I can't be fully sure. But assuming I'm looking at the correct code, I don't believe that it saves to disk. It looks like it just creates a Texture2D out of the received data. There doesn't seem to be any caching or anything either. So it's up to you to store it so it doesn't get garbage collected.
I'm more curious about memory usage, or etc.
If I download like 100 images.
I just wasn't sure if it did some weird temp caching, in some files
This would be like the same as loading up those 100 images from your content browser. They'll stay loaded as long as you keep a pointer to the image(this includes like putting it in an image widget since that internally keeps what it's displaying alive).
The single point of difference is that instead of having the image data in your project, you're receiving it from a download. Both end up putting data into a UTexture2D essentially.
I just wasn't sure how textures work.
Don't actual texture files read from the file every so often, to update texture maps?
Or, are full files, also just 100% pushed into memory?
I also just wasn't sure if the dynamic ones had overhead, since they legit ONLY exist in memory
Normal textures it depends on their settings. If they're not allowed to stream, they have to be 100% loaded from disk to memory before they can be used. I'm not 100% sure on the streamed ones, but I'm under the impression that they just give you a fast Mip0 that you can use immediately and then stream in the higher level mips over time. I'm unsure if they dynamically unload mips as you go though. My experience is usually UI where the mips don't really change much even if you use them cause they're based on screen space and that doesn't change usually.
Hope this explains it.
Any ideas why "Destroy Actor" isn't destroying my controlled character actor and respawns leaving behind a copy?
Odd part is it still triggers Event Destroyed (and "Respawn Player") correctly
I'm trying to set my CameraComponent to 0,0 by changing it in the Details settings. But the Details option doesn't show up for me?
Put a breakpoint on the Branch node and see what you're actually comparing.
Oh, looks like the top is getting a component while the bottom is getting an Actor (get owner).
Have Grabbed Component call Get Owner to compare actor to actor.
still prints false
Tried the breakpoint thing?
this is a actor blueprint
You can still put a breakpoint.
okay, what would this do though?
And manually inspect what it's actually comparing.
When you hit a breakpoint you can mouse over the blue output pins and see what value they have.
how do i do a breakpoint?
rightclick the node
Or f9
Where do I start?
Thank you for the advice. Sending message to the game state is indeed very easy, I'm just using 'GetGameState' and sending it with an interface. But what about updating values in widgets from the game state? I created an interface function with inputs, but I still need to use 'GetAllWidgetsOfClass', right? Is this optimal?
Is there some people that use the motion warping node ?
The Warp Target Bone Name?
do you know if it move that bones to the location?
if it's not empty?
Did you mak a parent class ? You can cast for this
are you switching names ? wdym not alts ? are you doing the exact same thing as someone else ? wtf is going on here lol
asking in here as well as this issue seems to happen when doing it through pcg and not pcg. So I have my spline and if I do 90 degree corner the spline mesh gets twisted and I can't see to get it to fix unless I put it slight off 90 corner
Event destroyed is called frame before destroy. You have some gate there. Maybe it block destroy event
You can try to print actor self on event tick and see if it's valid, also breakpoint. Also maybe just call event on controller on destroyed/death
I'm mean for game mode. Not from character that's about to die
You should not have code after destroy is called, for starters, thatâs prly whatâs causing it. Use visibility to hide it if you need to run stuff first and then destroy when youâre completely done running code
Everything but the UI is piss easy
the UI with the dragging and dropping is the most work
I'm doing a quick and dirty prototype with abilities as actors, all subclasses of BaseAbility
What's the simplest way to map inputs to ability instances in a generic fashion?
Right now when I spawn the ability actors from an array of classes I just do a cast chain to set up MySprint and MyJump and MySuperPower etc, feels dirty tho
They're actors?
I have a base class that I used to have a mesh for, but converted it to a base class / abstract. When I did that, I cleared what was in static mesh, but it's still showing up in the content drawer.... what should i check? Do I just need to refresh something?
Yeah just for simplicity + to have timelines in them
What do you mean by still in the content drawer?
It's a quick and dirty single player thing
Base and dummy showing the mesh. But no mesh applied to Base
Can't you just put the inputs in them directly, like implement the IA in the ability actors. Like IA_Jump goes in MyJump. Then you can just loop them as the base class type and EnableInput?
Ah. Thumbnail didn't update. Can't recall how to cause that to refresh. Compile with the viewport actor or save?
That's a pretty slick idea
Although mapping it to AI driving these things around would be a bit weird too
maybe gameplaytags
Ah, okay. I thought it might be a thumbnail issue not refreshing. I've closed the editor, restarted, recompiled, saved all, removed child actors from the scene, etc. Eh, not a big deal, just thought there might be a simple button i missed.
I think that's how GAS does their stuff kinda. I've never looked how to map IAs to their input keys you use. Lyra does it for GAS somehow. But yeah activate by tag would be a good one if you need AI activation by type.
I'd just like to make AI able to query to figure out their bodies capabilities
"Do I have a way to move fast?" etc
yeah tags might be it
i have 2 accounts here, one was my previous. this ones my new, but im still using my alt so sometimes i forget which one im on
just ignore it.
well one of them is my actor (where this code takes place) and im casting it to my character bp.
so how would i do a parent class thing?
you want a variable on all the things you can pick up that you can access right ?
^
well what im doing is, making it so theres a variable in my main character bp, that all object bps will cast to, and add their value to that variable if they get picked up
having a bit of an issue setting values in a dynamic material in runtime
it prints the correct number but its not setting
what am i doing wrong here?
idk what that means
you created the material instance, but did you assign the material instance to the mesh ?
cast to the parent
i'm not going to keep repeating just read it
i assumed it would assing automaticly since you drag it fro mthe mesh node
also the material shows up in the mesh
so it should be there
ok well you have to assign it because you created a new instance
so just assign the material onto the mesh and it will most likely work
it's not the same instance
your creating a new one
just tried it, thats not the issue
that is definately the isue
show what you did
you cant just create an instance and it magically works with a mesh
you need to assign it
set material node
plug the instance into it
what do i plug in object?
wtf are you even doing ?
đ€·ââïž you said cast to parent.
so alien egg is your parent class ?
more than likely
you don't need mesh plugged into target, what bp is this ?
its just an actor derived from a custom c++ class
What is Casting in Unreal Engine 4 Blueprints?
Source Files: https://github.com/MWadstein/wtf-hdi-files
dont drag out from mesh, just create dynamic material instance
behaves exactly the same
so is the default material working ? set the material to something like the grid
then set this material
is the basica thing working with no setting changes ?
default material works fine
is it applying ?
is the question
as far as works fine, you want to test to make sure the material is being applied
first thing
The thing you want to check if it's an ALienEgg or not
if it's being applied then your probably not setting the correct param name or something
Can anyone help, everytime I try to delete this variable from my player bp it tryâs loading in all the referenced actors to it and ends up crashing. Is there anyway I can change this variable so that itâs empty before I delete, because even if I change it to a bool or something it still gets all the references
you can try the option to replace all references when you delete
i'll say it again ig, check to make sure the instance is being applied
start with the grid material
create the instance
set the material
does it change ?
How do I do that
got it to work, it was an issue with the default value of the variable i was using to set the value
This variable isnât being referenced in the actual bp Iâm trying to delete it from
so show what you see when you delete the variable
it should say theres a bunch of references
does it mention you can replace ?
maybe actually i'm thinking wrong window
debug that, there's a render debug scalar node
No it just shows loading referencing assets loading bar
And then takes forever and eventually crashes
its working now, sorta
right click, and do: replace references ?
well thats not good lol
you don't want ==, the cast is the check
you should watch the video i sent
^
Why is the delay not executed? Does anyone have a solution?
how do you know it's not? it's 45s delay
print something before Ferting function call
or add a breakpoint
I know because a video is playing
?
every time you click that button it starts that delay over again btw
i know its a Start button
are you maybe deleting that widget that this delay is inside?
also i'm not sure if you can open level from the widget, you should make this call to GameMode probably
That only happens with RegriggerableDelays. Normal Delay just ignores you til it finishes it's original timer.
yes but I think I have the problem you are not allowed to tab out
so create delay + open in gamemode, and call function on gamemode from widget
okay i try
at this point use set timer by event, thats quite a delay
I've already tried it, it doesn't work either
Lol, I didn't even see the time.
so it only executes this code if it is casting? or what.
if the cast succeeded then it will run
What do you mean by "if it's casting"? Cast is just a type check. If Owner is an AlienEgg,then this will print.
it does work, print string hello on the timer
it does but the delay dont
yes
so then it's working
but the timer dont work
your not making sense
i know
show the code @safe sigil that isn't working
Is get owner the correct thing for it? As I feel like I would need to do something to get the mesh that Iâm picking up, or the actor. Something other than owner
probably not the right thing
what bp is this in ?
the print string is before or after the delay ?
put it after the delay as well and check it goes off
if you restart the engine
and it's still doing it your probably doing it wrong
let me try one thing
XD
Hmmm, trying to build a small test area that is an empty open world. created a small thing, went to env light mixer after, added sky atmosphere and sky light. But... everything is black. After adding those, they appear to be above the landscape I added, but nothing is being lit...
The prebuilt open world thing works well. But, it's huge. Just wanting a small one to mess around with.
the actor one
what actor ?
i would do get grabbed component -> get owner ?
not just get owner
if anything
Is there a way to set a property binding up for a new member you have created from a blueprint?
Would like to have something exposed on my blueprint like what a slider does for some other UI widgets I have created.
and why is that a problem?
Binding is fine if you only got a bit of UI, and it's probably the best approach if the data is updating often like regenerating health
You wouldn't want to bind for WoW or EVE but it's totally fine for a couple health bars
usually its abused so i would ban it
unless its something updated very frequently i would always make an OnMyPropertyUpdated function and call that when a value changed
Is there a way to see if a UI has bindings?
I tried to interpret on binding and it didn't work so I wonder why that is ?
Lol... If you've ever scripted Lua for WoW addons.. Trust me.. You'd want BP bindings after that shit. đ
Feel like I'm doing this really wrong. lol. What's a better way of doing this?
it works.... unpause timer once I stop running, pause timer when I'm running. For stamina regen.
show more
when is this code ran, and what's that bool
Why do you go through all this trouble instead of just changing staminaregen based on if you're running or not
Haven't found a better place to put it yet, that functions as needed.
I was just eyeing the movement area of my setup, possibly doing it when transitioning from running to walking. But, I think before I ran into issues of just standing still ,caused it to not regen. Or, if I transition from running to stopped, it keep draining.
This was a hacked together solution for the time being. but, decided to get back to it.
TimerFires -> are you running? -> yes -> no stamina for you
-> no -> ok here's some stamina
unless you really want the stamina regen ticks aliasing and pausing like they will with your current setup
if not you can make a bool, but you're overcomplicating it
is timer running. haha
Thanks!
Oh, for sure I had a feeling I was overcomplicating it. Late night ... "I'm gonna make this MF work!" hahah.
Thanks!
is it bad to pass a struct by reference in Blueprints?
Im getting this warning:
and also, i get a super weird crash, like ive never seen before
Passing a struct is fine. The warning is just telling you that this interface function will not affect this struct.
It's essentially warning you that the interface is a const FMyStructThing& StructName. It's by ref, but const. You can't write back to it.
đ«Ą
got it
hi, im doing a widget blueprint and am doing a gamemode container box using a data asset and i cant figure out whats wrong. Does anyone have any experience that could help me out? Its very simple at the moment i guess its just not clicking for me.
So my character just randomly stopped sprinting. I did a key check but it still doesnt work. All the character will do is sprint when you initially press the left shift, but then nothing. I haven't even touched the sprinting logic, because it has been working as intended up until this moment.
What's the purpose of that bottom branch?
I don't see anything in that logic that would be a cause... maybe somewhere in the IA key stuff?
Prob never passing the first branch cause its not set true unless already true
Prove it to false
Move
has anyone been able to get plugins that are not mac compatible to work?
i saw you can force it by changing some text files and adding mac to the whitelist but have't had any luck with it
Hey if anyone could give insight into why my Material Preview is completely black it would be super helpful. Findings in the post below:
https://forums.unrealengine.com/t/every-material-is-solid-black-and-unlit-in-preview/2650918
Iâve begun work on another project in UE5.5. I wanted to use some old assets from a previous project, mainly Material Instances and Textures, so I migrated them. After migration, every material and material instance looks the same in the preview, solid black and unlit. Interestingly enough, the materials work in the actual scene, but they look...
I made a 2d array struct in c++ and cant help but feeling weird using it in blueprint compared to perform unflattening operations on a 1d array.
curious on if people prefer one way over the other for those of you that dabbled in both?
Is there a way besides Nav Modifier volumes to annotate the nav mesh? I want to be able to define 2D areas of the nav mesh as "territories".
For AI purposes.
you can do that with nav mod volumes
or rather, you have some agency in the volume purpose
Depends if you need to resize each array. In a 2d array, each sub-array is separate memory and you can reallocate much easier.
good call
i love this answer i will keep the thing and flatten it where it makes sense
My apprehension is that I might need a more complex shape than a box or cylinder. Am I able to check if a given nav point is wihtin a specific nav modifier actor?
Working with arrays in BP is a big pain. I'd go with some kind of boxed array object.
Then you can make your own interface.
ask this and know you can do any thing
your approach most likely depends on the usecase and more specifically the system that enables or warrants the usecase
for any actor to know where they are they need some sort of local knowledge, if navmesh can pass that via custom volumes i have no clue
if the game is wholly 2d, you can do lots of other cheap stuff
Sure. My use case is I am making a dungeon-crawler game and need to be able to mark sections of the navmesh as territories. My AI characters will be assigned to a territory and their AI will change when they are inside or outside it. They will also have an Inner territory and an Outer territory, where if they exit the outer territory they are forced to run back until they are back in the inner.
The game is 3D.
but it can be as simple as switching local knowledge enums with triggers volumes that are unrelated to navmesh
i ment 2d as in the topology/level design/architecture does not enable actors on multiple stories as an example
Topology wise it can have multiple stories.
either way think of the simplest solution. if we assume your crawler is proc gen for layout, look at your smallest common piece of dungeon layout, how do you refien those? can you add "territory volumes"?
It's not procgen.
This will be authored.
My concern is: making complex shapes, being able to recognize some quantity of volumes as a group, and being able to manage it all.
Ok so 1st thing i would do is to look into nav mesh volumes and see if they can act as behavioural switches
what is a complex shape?
I just had a realization: The number of volumes that actually overlap are going to be very low. Almost all will be edge to edge, barring some sincerely complex shapes.
One with concave edges.
or rather, why would a territory shape need to be complex
True. If I imagine a square room with 3 corridors leading out I can represent that with four boxes.
also if you try to name the component of the design for what it does, it usually helps in its conception
territory volume, behavioural switch volume, etc etc
@hardy merlin also would it makes sense if the ground was managing the information? just to present an alternative that doesnt require extra management to the level outside populating existing aspects with extra data
Unlikely. I'd have to annotate every prop the player could walk on. The navmesh already does that for me.
So my character just randomly stopped
Hello, Is there a way to set the landing point on Predict Projectile Path by Object? So that if it's between 0 - 1000 it'll hit any object inside that range?
break it down a bit. what value is between 1 and 1000
I'm making logic to allow a character to jump between ledges. I'm using predict projectile on path to find the ledges. 0 is in front of the player, 1000 is the max distance the player can jump
im not familiar with predict projectile path. do you already have it working to some degree?
Yeah, but it tends to overshoot for anything that's not at the correct length. So, anything that's closer to the player ends up ignored
which aspect is being ignored? collection of actors in the path?
What is the simplest usecase for the prediction? what are the inputs and the expected return?
Input is movement velocity, and the expected return would be to find any tagged object so it would snap to it. I've added a video. The first jump should have landed, since it's in the range
without knowing how it works at all but looking at the green spheres, it looks like the capsule midpoint hits in the edge of the shape and slides away.
this looks like a miss if im interpeting the visuals correctly
and the collision points looks like they hit the edge
what is the snap logic?
This is what I want it to do.
- Green is the usual jump path
- Orange is max jump distance
- Black square is any ledge / beam
- Blue is jump path adjusted to the beam
you may want to predict many paths and use the one with a hit at that height
im assuming orange is 0 to 1000 ?
whats missing here is how you jump. Is the jump an action product from the prediction?
No, I'm jumping and calculating afterwards using the predict projectile path
how would you alter the current jump trajectory to fit a new path?
or rather, override the current trajectory with a new one
That's why I wanted to see if there's a way to calculate trajectory using the landing position
Even if it's using a different node to launch the character
Doesn't predict projectile path require a force?
theres also custom arc
Oh, ok. i wasn't aware of the custom arc suggestion. This might be what I'm looking for. Thanks a lot
Hey Im wodnering why sometimes when calling interface there is word and symbol of message and sometimes its just like function? If I turn off context sensitive there is always option with message. What is the difference
Interfaces allow for blueprints to communicate to one another without casting. Say for example you have a door that you want your character to open. You can implement the generic sounding "interact" event on blueprint "door" so that whenever its called by another blueprint it can perform the logic to open the door.
Then on the character blueprint you can have an event setup that does a linetrace and whatever actor it hits it can send the "interact" message to.
Once your character is setup to "interact" with actors in the level, you can simply make a new blueprint for weapons or items and implement the "interact" event on them to perform different actions.
The benefit here is that when the linetrace hits something it doesn't matter if the target actually does anything with the "interact" message its being sent. It's like a fire-and-forget type of behavior that doesn't create a hard reference (because there's no casting or variable reference) thus keeping your memory usage in check.
ou you misundertood me, bnut thank you for clarification. What I meant is why sometimes there is no (message) when typing interface name like in screen above, and I have to uncheck "context sensitive" to see it
Hey everyone,
Iâm trying to set up a resolution settings list in my UE5 Blueprint UI. Hereâs my current BP setup for populating the resolution array (snippet below). Iâm using GetSupportedFullscreenResolutions, but for some reason it always returns null; and thus goes into the fallback mode I added..
It seems like the array from GetSupportedFullscreenResolutions is always empty or the function fails, even though Iâm testing on real hardware (not a VM).
Has anyone run into this before on Linux (or generally)? Is there something Iâm missing, or do you know any alternatives/workarounds to get supported resolutions reliably?
Thanks in advance!
When you drag a pin from another actor you can call any message using the blueprint interface
I've got some noob question, I am trying to revert a Rot variable from my character to a vector 2D, basically to be able to have X Y variable as inputs
Need more context maybe. Not following what the rotator needs to be converted for the 2D for.
Hi all!
I'm trying to setup some interaction system using VR Template and this tutorial: https://www.youtube.com/watch?v=peQq9f_EtrE
After I set all up, lever is working, but it is super sensitive to the movement of the hand, like even the slightest movement drops it all the way to the other end.
Any idea how to change/adjust it?
Huge shoutouts to @GDXR @VRPlayground and @SirFansi for helping me create this method, it was a combined creation of all of their methods for a VR interaction system in Unreal Engine.
This isn't the normal type of video I make, but if you'd like to see more like it let me know!
Like, comment and subscribe if you want toâŠ
And donât forget ...
That's interesting. I've never seen that fail before. But I've never tested it on Linux. Is there any chance you have a Windows build to try it on?
@spark steppe might also have some insight here if he's ever tested anything similar. I know he's a Linux user.
no idea, i'm not targeting Linux (only using it for dev)
It's a bit hard to explain but basically I'd need to revert some Rot into X and Y action value
also, I am only using Yaw Value (Y)
Lol
Not sure if thatâs even possible, but why are you trying to do this? Maybe thereâs a better way
"revert a Rot variable from my character to a vector 2D," ?? "as inputs" ? huh ?
can u give whole bp code screen and more detailed about ur idea. i think we need more info
Heâs trying to turn actual rotation into action values which are very different things. @final mortar if you print out those action values youâll understand what youâre trying to do is not feasible. But thereâs likely a better solution for what youâre trying to do, youâll need to explain what that is tho
i still don't know what that means, the rotation controls the action value ? for instance is it 0 rotation to 360, where 0 and 360 are something like 1, and 180 is -1 ?
"The cosine function naturally gives you this mapping" -AI
perhaps if its just one angle like z the math would be pretty easy
What does that give you exactly?
cos(0) = 1
cos(90°) = 0
cos(180°) = -1
cos(270°) = 0
cos(360°) = 1
idk if thats exact what they want but theres math for all sorts of mapping
then you can offset by whatever to have your start angle and get your range
cos(angle (- or +) offset);
Any ideas on this topic? đ
no tick or interfaces
100 hz timer
that tutorial is ass
Literally there is no other way
Every tut that I found uses that way
because they probably all copied from each other đ
set the lever position to the initial hand/controller location when the interaction started?!
so that the movement "in VR" maps 1:1 to the virtual world (i think it's what they trying to do)
Yeah that's kinda f* up
That's what I'm doing I guess
yea, looks like it, but apparently doesn't work!?
I would probally get the look at rotation from the lever base and the hand position. Locking the rotation to a given axis. Interp between the current and new rotation and it should look pretty good.
maybe the issue is that you map the offset to the rotation
i would suggest to slap a map range node between that
then your output range is -60 to 60
and the input range you gotta play with (or calculate :P)
Works, but the lever just flicks between two end points...
And when I have my hand in the air above the lever, it wags like a stray dog
hello, i need help, I'm making car drivable in ue5.5, in that i have make it drivable but my car is drifting a lot. please help me to make it run smoothly like a real one.
also adding the existing roll to the value might be wrong
#chaos-physics is a better place for this
i have use chaos physics still it get drifting.
Between where exactly?
instead of your clamp node
and eventually don't add the existing roll, because i feel like this may be the main source of your flickering
I guess
yea wait i've interpreted the thing wrong at first, sorry
brother this is for my problem?
does grabbing the lever move the GrabComponent?
i have make it in bp_car?
GrabComponent is part of the whole
you have to learn the english language, i told you that the channel #chaos-physics is better suited for your issue
Now it's only waging like stray dog all the time from one end point to the other
ok, i have an assumption about how this is supposed to work, revert to the original node setup
and get sure that GrabComponent is located at the end of the lever
In terms of 'Pure Functions' I saw the whole can't set variables thing. Does that apply to local variables as well, or just no modifying anything outside the function itself?
It is now
Like, if I need something in the function to run a total of items, but use a local variable to store them
also their code expects that the lever movement is on the Y axis, is that the case for your setup?
that's fine
I made sure that my axes were working correctly, even if they were different from those in the guide.
Cuz it is taking rotation from the lever (in axis I want it to move) and location axis I want my hand to move while holding the lever
So in my case it's Y location and X rotation
When grabbed, lever should follow position of the hand by Y axis and rotate itself in X axis
so did moving the grab component change anything?
Don't know cuz the meta quest need an update so I'm waiting
F* meta
Hate this stuff, but can't afford anything better
oh my condolences for working with a quest...
Yeah
you SHOULD be using tick.
You want the thing to be in a valid location per frame
per frame = tick
i think it doesn't matter?
I have timer
since it just maps the relative location to a rotation
That works only when grabbing the lever
and the quest will likely not hit 100fps anyways (guessing he runs native) đ
I just found a thread on Reddit; where a user mentioned that games on Linux with fullscreen; actually use windowless borders.. It wasn't related to game-dev; more gamers in general.. but I now opted for checking OS name; if not Linux proceed. On Linux just insert a default resolution range. Thanks for the reply đ
A pure function should return the exact same result given the same inputs, and not change any state anywhere.
BP lets you do all sorts of busted stuff in a "pure" function but that's the intent.
yea, max once per frame should be ticked
at that point it's just tick with extra steps lol
without the ability to choose per or post physics
it won't change anything tho behavior would be the same with multiple ticks per frame
Ah okay!
all that math is goofy. Just cook up a relative rotation to point at the thing, then restrict it on whatever axes you want
inverse transform position, find look at rotation, then limit
Yep, it flicks to one side and then freezes
Like literally can't make it move
is the lever placed in the world to move along the y-axis, too?
Because that math is wrong
Idk 4 tuts using this and it works
What if I use PhysicsConstraint?
Tutorials don't always show you good practice... Or working code.
physics constraint will do the job if you want it to be physics driven
I mean, I would like to snap the hand to the handle and then move along the axis
This tuts aren't what I'm looking for either way
But I wanted to check how it works
You want to snap the hand to the handle or the other way around? Seeing your hand go where it's not in VR would be kinda silly
All of that math is fucked, not at all worth even considering
i have a hard time twisting my head around it right now
yea, mapping the linear movement to angular rotation like this is... wild
If your goal is "handle points towards hand" then it's this simple.
Convert hand world location to relative location in the reference frame the handle is in (inverse transform location)
Cook up the target rotation using FindLookAtRotation
Break it up, only using the pitch or yaw or roll that you want
Of course you can do an angular clamp
If FindLookAtRotation doesn't work for you (it might not depending on which axis you need to be the free one), then RotationFromXY or any of the varieties will do it
And pin it to event tick or what?
Cuz now it looks like that and literally don't work
You're mixing up world and relative coordinates there
I was remoted in to my home computer so the mouse is a bit jiggly
Still wags like stray dog
Whoops Motion Controller should be GrabComponent but you wouldn't guess it
Now it stays in one end
Forever
Idk basic mechanics always don't work for me
I managed to program flashlight that charges when shaking all by myself, but can't make F* lever to make it's thing đ©
Idk maybe it's because you are on FP Project and I'm working on VR
Here is a tip I worked out when referencing stuff. Create all of your references (character/mesh/capsule component etc) inside a single actor component and reference that component in all other actor components instead of having to create all of those references over and over again in each component.
Shouldn't matter, show what it's doing
huh? How would that work?
why do that? Are you doing like:
Get component by class -> get the refs?
Inside your actor component, get the owner of component (pawn reference) and cast to character then get component by class and use a single reference component.
Then get your character, controller, mesh and capsule component references inside that component. Even the anim instance etc.
This way you are referencing a single variable - not repeating those variables over and over in each component.
This is assuming your features are broken down into actor components. I do everything in them.
Also, you can easily access it via the get component by class node and totally avoids having to cast to the character.
Like I have my main UI inside an actor component. Much easier to access.
Once you start storing variables in the character blueprint, you now have to cast to it to access said variables. Unless that variable is in an actor component then you bypass having to cast to character and just get component by class.
I mean casting isn't a problem here
Either way the character class is getting loaded
Casting to character etc. is fine as they are already loaded onto memory. I mean your BP_MasterCharacter.
Yes, and they are already in memory because they're being referenced by your component
Once you create a character class, it's now a hard reference which is not loaded onto memory. If you do your actor component references correctly, you just use the base classes like character and player controller and you have enough to do your functionality.
This way you can attach it to any character to add said functionality to it.
Yes, or just cast to BaseClass. It's all the same memory wise, you're not saving anything.
It might be more expensive doing all the get component by class queries if you're doing that at high frequency
My point is doing the cast once, in a reference actor component. Not having to do those references again and again in each actor component.
And referencing that single variable. Not making heaps.
You store the reference component to a variable on begin play for each new actor component.
Then you have access to all types of references. And you do those references once inside your reference component.
And if you need to use just the get component by class node, like for begin overlap events, you're only referencing a single component - the reference one.
And if for some reason you need to access a class, like BP_ThirdPersonCharacter, you just use an interface with the base class reference. In this case, character.
I forgot to mention, all of the other actor components are referenced in the reference component, giving you access to all other features/components.
Considering each feature is done in individual actor components.
I'm pretty sure they are already loaded onto memory by default as they are C++ classes.
I mean, Character > Player Controller etc. but BP_ThirdPersonCharacter for instance isn't.
Hello, I have a platform that moves up when you press the button once. But id like to know what I need exactly to make it come back down on its own without me having to press the button
Try this. Make a custom event called "ResetPlatform" then off the finished pin of the timeline call that event. Then plug that event into reverse pin on start of timeline.
Oh sorry, off the finished pin do a delay then call event
