Temptica
Unity Setting Parent (XrOrigin)
So I have a player who needs to take a bus. But when the player steps on the bus, it just teleports to a very offset position.
The bus has an animation, a bus object that is scaled which is just the visual model, a cube which detects if a person is trying to step on the bus, and offset which I'll explain later.
The player has a cube in the camera offset which is the collision box
(see screenshot 1)
As code I have this on trigger Enter that checks if the bus is stopped and if the collider is a player.
The collider is this cube so to get the Xr Origin I take transform.parent.parent.
Then I get the offset object (it was a test solution, hence the bad tag and naming). This has a very big offset so when I attatch the player to it when you stepped on at the back, you end up at the exact same spot. This only works if you step exactly in the middle of the back door.
If I use SetParent, no matter if I give true or false, or I set my parent this way, My player always ends up far away from the bus while still being attatched
1 replies
✅ Urgent | Cannot update property in EF because another instance with the same key is being tracked
Hi, so I have following code: Basically I get a batch to update the field
I get the error on the 'entry' line. If I leave it, it doesn't update the field (yes I do commit later on in my CQRS).
I have a code freeze tomorrow night so henc ethe Urgency as It's an imprtant feature the client wants which they only let us know very late...
Full error
43 replies
❔ EF Core not create model on start-up
So I have an ASP.NET Web API running on docker which works. So does the SQL DB . The API can connect to the database. I can open the database with SSMS. But it only contains the default system databases.
I have a working DBContext but somehow when in the docker container after performing docker-compose up, the Model has not been created. I added following line in the Program.cs
It works without docker
38 replies
❔ ASP.NET api Timeout when fetching data from DB
So I’m working on an ASP.NET Core api with a database. It’s all running on localhost. I used EFC to perform data migration and that worked successfully. I know that my connection string is correct, and that data can be fetched in an instance. But when I perform a .find on my DBContext, I only get a time-put error after 15ish seconds.
"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server: Could not open a connection to SQL Server)"
Let me know what other info you need
8 replies