Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Engine/apps/editor/src/agent_tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ impl EditorApp {
{
if !matches!(
k.as_str(),
"color" | "anchored" | "can_touch" | "can_collide"
"color" | "anchored" | "can_touch" | "can_collide" | "friction"
) {
return Err(format!("unknown part attribute: {k}"));
}
Expand Down
10 changes: 9 additions & 1 deletion Engine/apps/editor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2909,7 +2909,7 @@ impl EditorViewer<'_> {
attributes.color = color;
attributes_changed |= ui
.checkbox(&mut attributes.can_touch, "Can touch")
.on_hover_text("Reserved for touch events. Does not affect solid collisions.")
.on_hover_text("Enables clicks, taps and collision event subscriptions. Does not affect solid response.")
.changed();
attributes_changed |= ui
.checkbox(&mut attributes.can_collide, "Can collide")
Expand All @@ -2921,6 +2921,14 @@ impl EditorViewer<'_> {
"Prevents gravity and collision response from moving this primitive in Play.",
)
.changed();
attributes_changed |= ui
.add(
egui::DragValue::new(&mut attributes.friction)
.range(0.0..=10.0)
.speed(0.01)
.prefix("Friction: "),
)
.changed();
ui.label(format!(
"Parent: {}",
snapshot
Expand Down
3 changes: 3 additions & 0 deletions Engine/apps/luau-host/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ fn run() -> Result<(), Box<dyn std::error::Error>> {
if let Some(error) = response.get("error").and_then(serde_json::Value::as_str) {
return Err(mlua::Error::external(error.to_owned()));
}
if response["result"].is_null() {
return Ok(Value::Nil);
}
lua.to_value_with(
&response["result"],
mlua::SerializeOptions::new().serialize_none_to_null(false),
Expand Down
Loading
Loading